Chris@0: Chris@0: PLUGIN_EXT ?= .so Chris@0: Chris@0: CXX ?= g++ Chris@0: CC ?= gcc Chris@0: Chris@0: CFLAGS := $(CFLAGS) Chris@0: CXXFLAGS := -I. $(CXXFLAGS) Chris@0: Chris@1: PLUGIN := chp$(PLUGIN_EXT) Chris@0: Chris@0: SOURCES := ConstrainedHarmonicPeak.cpp Chris@0: Chris@0: PLUGIN_MAIN := plugins.cpp Chris@0: Chris@0: TESTS := Chris@0: Chris@0: OBJECTS := $(SOURCES:.cpp=.o) Chris@0: OBJECTS := $(OBJECTS:.c=.o) Chris@0: Chris@0: PLUGIN_OBJECTS := $(OBJECTS) $(PLUGIN_MAIN:.cpp=.o) Chris@0: Chris@0: all: $(PLUGIN) $(TESTS) Chris@0: for t in $(TESTS); do echo "Running $$t"; ./"$$t" || exit 1; done Chris@0: Chris@0: plugin: $(PLUGIN) Chris@0: Chris@0: $(PLUGIN): $(PLUGIN_OBJECTS) Chris@0: $(CXX) -o $@ $^ $(PLUGIN_LDFLAGS) Chris@0: Chris@0: clean: Chris@0: rm -f $(PLUGIN_OBJECTS) test/*.o Chris@0: Chris@0: distclean: clean Chris@0: rm -f $(PLUGIN) $(TESTS) Chris@0: Chris@0: depend: Chris@0: makedepend -Y -fMakefile.inc *.cpp test/*.cpp *.h test/*.h Chris@0: Chris@0: # DO NOT DELETE Chris@0: Chris@0: ConstrainedHarmonicPeak.o: ConstrainedHarmonicPeak.h Chris@0: plugins.o: ConstrainedHarmonicPeak.h