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