aboutsummaryrefslogtreecommitdiff
path: root/plugins/gpulib/Makefile
diff options
context:
space:
mode:
authornotaz2012-05-01 00:39:05 +0300
committernotaz2012-05-27 20:11:00 +0300
commitdd4d5a35678c8ff7f9a7c0ac42be354671534f96 (patch)
treefa3b4edac9a112bd15fb78c16f5992b080871211 /plugins/gpulib/Makefile
parentb105cf4f5e168fdce54c6011533df76d196a917b (diff)
downloadpcsx_rearmed-dd4d5a35678c8ff7f9a7c0ac42be354671534f96.tar.gz
pcsx_rearmed-dd4d5a35678c8ff7f9a7c0ac42be354671534f96.tar.bz2
pcsx_rearmed-dd4d5a35678c8ff7f9a7c0ac42be354671534f96.zip
automatically build plugins
Diffstat (limited to 'plugins/gpulib/Makefile')
-rw-r--r--plugins/gpulib/Makefile19
1 files changed, 16 insertions, 3 deletions
diff --git a/plugins/gpulib/Makefile b/plugins/gpulib/Makefile
index 2739e5c..4a45aa2 100644
--- a/plugins/gpulib/Makefile
+++ b/plugins/gpulib/Makefile
@@ -23,15 +23,28 @@ OBJS += cspace.o
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 $(TARGET)
+all: ../../config.mak obj $(TARGET)
-$(TARGET): $(OBJS)
+$(TARGET): $(OBJS2)
$(AR) crs $@ $^
+obj/%.o: %.c
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^
+
+obj/%.o: %.s
+ $(AS) $(ASFLAGS) -o $@ $^
+
clean:
- $(RM) $(TARGET) $(OBJS)
+ $(RM) $(TARGET) $(OBJS2)
+
+obj:
+ mkdir -p $@
../../config.mak:
@echo "Please run ./configure before running make!"