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