1 # depends on ARCH definition
2 # always adding gpulib to deps (XXX might be no longer needed)
3 # users must include ../../config.mak
5 LDFLAGS += -shared -Wl,--no-undefined
6 CFLAGS += $(PLUGIN_CFLAGS)
10 #LDLIBS_GPULIB += `sdl-config --libs`
17 GPULIB_A = ../gpulib/gpulib$(EXT).a
20 TARGETS += $(BIN_STANDALONE)
23 TARGETS += $(BIN_GPULIB)
25 CC_STANDLALONE = $(CC)
29 PLUGINDIR = $(shell basename $(WD))
31 all: ../../config.mak $(TARGETS)
34 ifneq ($(findstring .cpp,$(SRC_STANDALONE)),)
35 CC_STANDLALONE = $(CXX)
37 $(BIN_STANDALONE): $(SRC) $(SRC_STANDALONE) $(GPULIB_A)
38 $(CC_STANDLALONE) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) $(LDLIBS_STANDALONE)
39 ln -fs $(PLUGINDIR)/$@ ../
43 ifneq ($(findstring .cpp,$(SRC_GPULIB)),)
46 $(BIN_GPULIB): $(SRC) $(SRC_GPULIB) $(GPULIB_A)
47 $(CC_GPULIB) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) $(LDLIBS_GPULIB)
48 ln -fs $(PLUGINDIR)/$@ ../
52 make -C ../gpulib/ all
58 @echo "Please run ./configure before running make!"