Merge git://github.com/notaz/pcsx_rearmed
[pcsx_rearmed.git] / plugins / gpulib / Makefile
... / ...
CommitLineData
1CFLAGS += -ggdb -Wall
2ifndef DEBUG
3CFLAGS += -O2
4endif
5
6include ../../config.mak
7
8OBJS += gpu.o
9
10ifeq "$(ARCH)" "arm"
11OBJS += vout_pl.o
12EXT = a
13else
14#CFLAGS += `sdl-config --cflags`
15#OBJS += vout_sdl.o
16OBJS += vout_pl.o
17EXT = $(ARCH).a
18endif
19ifeq "$(HAVE_NEON)" "1"
20OBJS += cspace_neon.o
21else
22OBJS += cspace.o
23endif
24CFLAGS += $(PLUGIN_CFLAGS)
25
26# need to compile to another dir, same files are compiled
27# into main binary without PIC
28OBJS2 = $(patsubst %.o,obj/%.o,$(OBJS))
29
30TARGET = gpulib.$(EXT)
31
32all: ../../config.mak obj $(TARGET)
33
34$(TARGET): $(OBJS2)
35 $(AR) crs $@ $^
36
37obj/%.o: %.c
38 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^
39
40obj/%.o: %.s
41 $(AS) $(ASFLAGS) -o $@ $^
42
43clean:
44 $(RM) $(TARGET) $(OBJS2)
45
46obj:
47 mkdir -p $@
48
49../../config.mak:
50 @echo "Please run ./configure before running make!"
51 @exit 1