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 |
4132e8ca |
19 | CFLAGS += $(PLUGIN_CFLAGS) |
62d7fa95 |
20 | |
dd4d5a35 |
21 | # need to compile to another dir, same files are compiled |
22 | # into main binary without PIC |
23 | OBJS2 = $(patsubst %.o,obj/%.o,$(OBJS)) |
24 | |
62d7fa95 |
25 | TARGET = gpulib.$(EXT) |
26 | |
dd4d5a35 |
27 | all: ../../config.mak obj $(TARGET) |
62d7fa95 |
28 | |
dd4d5a35 |
29 | $(TARGET): $(OBJS2) |
62d7fa95 |
30 | $(AR) crs $@ $^ |
31 | |
dd4d5a35 |
32 | obj/%.o: %.c |
33 | $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^ |
34 | |
35 | obj/%.o: %.s |
36 | $(AS) $(ASFLAGS) -o $@ $^ |
37 | |
62d7fa95 |
38 | clean: |
dd4d5a35 |
39 | $(RM) $(TARGET) $(OBJS2) |
40 | |
41 | obj: |
42 | mkdir -p $@ |
4132e8ca |
43 | |
44 | ../../config.mak: |
45 | @echo "Please run ./configure before running make!" |
46 | @exit 1 |