2 # This is the main compiler
4 # CXX := clang --analyze # and comment out the linker last line for sanity
9 TARGET := $(BINDIR)/fast-gpio
12 SOURCES := $(shell find $(SRCDIR) -type f -name *.$(SRCEXT))
13 OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.o))
14 CXXFLAGS := -g # -Wall
15 #LIB := -pthread -lmongoclient -L lib -lboost_thread-mt -lboost_filesystem-mt -lboost_system-mt
17 #DEVICE_TYPE := "UNKNOWN"
18 override CXXFLAGS += -D 'DEVICE_TYPE="$(DEVICE_TYPE)"'
20 INC := $(shell find $(INCDIR) -maxdepth 1 -type d -exec echo -I {} \;)
25 @echo " $(CXX) $^ -o $(TARGET) $(LIB)"; $(CXX) $^ -o $(TARGET) $(LIB)
27 $(BUILDDIR)/%.o: $(SRCDIR)/%.$(SRCEXT)
29 @echo " $(CXX) $(CXXFLAGS) $(INC) -c -o $@ $<"; $(CXX) $(CXXFLAGS) $(INC) -c -o $@ $<
33 @echo " $(RM) -r $(BUILDDIR) $(BINDIR)"; $(RM) -r $(BUILDDIR) $(BINDIR)
40 $(CXX) $(CXXFLAGS) test/tester.cpp $(INC) $(LIB) -o bin/tester
44 # $(CXX) $(CXXFLAGS) spikes/ticket.cpp $(INC) $(LIB) -o bin/ticket