#CFLAGS += -O3 #CFLAGS += -I/opt/local/include #LDFLAGS += -L/opt/local/lib LDFLAGS += -lboost_serialization ifeq ($(shell uname -s),Darwin) DLLEXT := .dylib DLLOPT := -dynamiclib else DLLEXT := .so DLLOPT := -shared endif all: test_s11n test_s11n_static test_s11n_dyn ./test_s11n LD_LIBRARY_PATH=. ./test_s11n_dyn ./test_s11n_static S11N_OBJECTS := test_s11n_derived.o test_s11n_base.o test_s11n: $(S11N_OBJECTS) test_s11n.o $(CXX) $(S11N_OBJECTS) test_s11n.o -o $@ $(LDFLAGS) test_s11n_static: test_s11n.o libtest_s11n_static.a $(CXX) -L. -ltest_s11n_static test_s11n.o -o $@ $(LDFLAGS) test_s11n_dyn: test_s11n.o libtest_s11n_dyn$(DLLEXT) $(CXX) -L. -ltest_s11n_dyn test_s11n.o -o $@ $(LDFLAGS) libtest_s11n_static.a: $(S11N_OBJECTS) ar -sruv $@ $(S11N_OBJECTS) libtest_s11n_dyn$(DLLEXT): $(S11N_OBJECTS) $(CXX) $(DLLOPT) -o $@ $(S11N_OBJECTS) $(LDFLAGS) .cpp.o: $(CXX) $(CFLAGS) -c $< clean: rm -f *.o *.a *$(DLLEXT) test_s11n test_s11n_static test_s11n_dyn *~ test_s11n.xml