# very simple Makeifle for testing purposes # note that you will need configured R sources on non-Mac machines since REngine uses private headers # the following will work on Mac OS X with R framework installed CPPFLAGS=-I/Library/Frameworks/R.framework/Headers -I/Library/Frameworks/R.framework/PrivateHeaders LIBS=-framework Foundation # the following will work on other unices with libFoundation, but you have to adjust the path to _configured_ R sources #CPPFLAGS=$(shell R CMD config --cppflags) -I~/R-builds/R-2-4-branch/src/include #LIBS=-lFoundation # you can remove this but it's usually a good idea to use the same compiler as R CC=$(shell R CMD config CC) # normally you should not need to touch anything below this line DEFS=-DRENG_STAND_ALONE LDFLAGS=$(shell R CMD config --ldflags) SRC_M = ${wildcard *.m} SRC_C = ${wildcard *.c} OBJ = $(SRC_M:%.m=%.o) $(SRC_C:%.c=%.o) test: $(OBJ) $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) .SUFFIXES: .h .m .c .o .m.o: $(CC) -c $< -o $@ $(DEFS) $(CPPFLAGS) $(OBJCFLAGS) .c.o: $(CC) -c $< -o $@ $(DEFS) $(CPPFLAGS) $(CFLAGS) clean: rm -rf $(OBJ) *~