1 # depends on ARCH definition
2 # always adding gpulib to deps in case cspace is needed
3 # users must include ../../config.mak
6 CFLAGS += $(PLUGIN_CFLAGS)
10 #LDLIBS_GPULIB += `sdl-config --libs`
17 GPULIB_A = ../gpulib/gpulib$(EXT).a
20 TARGETS += $(BIN_STANDLALONE)$(EXT)
23 TARGETS += $(BIN_GPULIB)$(EXT)
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_STANDLALONE)$(EXT): $(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)$(EXT): $(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!"