aboutsummaryrefslogtreecommitdiff
path: root/plugins/gpulib/Makefile
blob: cff61410b451eec3396fa248af502aecda606506 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
CFLAGS += -ggdb -Wall
ifndef DEBUG
CFLAGS += -O2
endif

include ../../config.mak

OBJS += gpu.o

ifeq "$(ARCH)" "arm"
OBJS += vout_pl.o
EXT = a
else
#CFLAGS += `sdl-config --cflags`
#OBJS += vout_sdl.o
OBJS += vout_pl.o
EXT = $(ARCH).a
endif
CFLAGS += $(PLUGIN_CFLAGS)

# need to compile to another dir, same files are compiled
# into main binary without PIC
OBJS2 = $(patsubst %.o,obj/%.o,$(OBJS)) 

TARGET = gpulib.$(EXT)

all: ../../config.mak obj $(TARGET)

$(TARGET): $(OBJS2)
	$(AR) crs $@ $^

obj/%.o: %.c
	$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^

obj/%.o: %.s
	$(AS) $(ASFLAGS) -o $@ $^

clean:
	$(RM) $(TARGET) $(OBJS2)

obj:
	mkdir -p $@

../../config.mak:
	@echo "Please run ./configure before running make!"
	@exit 1