# # Makefile example # SOURCES = hvcontrol.cpp src/CCCommand.cc src/ConsoleCommand.cc src/HV.cc src/HVConfig.cc src/HVCalib.cc src/HVMonitor.cc src/HVStatus.cc src/Log.cc src/ProcessIO.cc src/ReadCard.cc src/Utilities.cc ../pixelmap/Pixel.cc ../pixelmap/PixelMap.cc OBJECTS = $(addsuffix .o, $(basename $(SOURCES))) INCDIRS = -I. -I../pixelmap -I./src CFLAGS = -pipe -fthread-jumps -funroll-all-loops -O3 -Wall -DOS_LINUX CPPFLAGS = -pipe -fPIC -fthread-jumps -funroll-all-loops -O3 -Wall -DOS_LINUX $(VMECTRL) LIBS = -lstdc++ -lz -lpthread -lutil -lfl -lusb -lftdi -L/usr/lib -L/sw/lib hvcontrol: $(OBJECTS) $(CC) $(CPPFLAGS) -o $@ $(OBJECTS) $(LIBS) clean: @rm -f $(OBJECTS) $(SOBJECTS).so @rm -f *.d @rm -f *~ -include Dep.d # Implicit rules %.o : %.c $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $< %.o : %.cc $(CC) $(CPPFLAGS) $(INCDIRS) -c -o $@ $< %.o : %.cpp $(CC) $(CPPFLAGS) $(INCDIRS) -c -o $@ $< %.d : @echo "Generating dependencies" $@ @$(CC) -MM $(SOURCES) $(INCDIRS) \ | sed 's/^\(.*\).o:/$@ \1.o:/' > $@