Changeset 35 for hvcontrol/Makefile
- Timestamp:
- 04/24/09 14:06:49 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
hvcontrol/Makefile
r14 r35 1 1 # 2 # Makefile for the CTX HV utility2 # Makefile example 3 3 # 4 4 5 include Makefile.general 5 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 ../../fact_repos.svn/pixelmap/Pixel.cc ../../fact_repos.svn/pixelmap/PixelMap.cc 6 6 7 PROGRAMS = hvcontrol remotecontrol 7 OBJECTS = $(addsuffix .o, $(basename $(SOURCES))) 8 8 9 SUBDIRS = src 9 #INCDIRS = -I. -IDRS -I../pixelmap 10 INCDIRS = -I. -I../pixelmap -I./src 10 11 12 CFLAGS = -pipe -fthread-jumps -funroll-all-loops -O3 -Wall -DOS_LINUX 13 CPPFLAGS = -pipe -fPIC -fthread-jumps -funroll-all-loops -O3 -Wall -DOS_LINUX $(VMECTRL) 14 LIBS = -lstdc++ -lz -lpthread -lutil -lfl -lusb -lftdi -L/usr/lib -L/sw/lib 11 15 12 all: $(PROGRAMS) 16 hvcontrol: $(OBJECTS) 17 $(CC) $(CPPFLAGS) -o $@ $(OBJECTS) $(LIBS) 13 18 19 clean: 20 @rm -f $(OBJECTS) $(SOBJECTS).so 21 @rm -f *.d 22 @rm -f *~ 14 23 15 OBJECTS = $(SUBDIRS:=/*.o) 24 -include Dep.d 16 25 17 INCDIRS = -I. $(SUBDIRS:%=-I%) 26 # Implicit rules 18 27 19 MRPROPERS = $(SUBDIRS:=.mrproper) 28 %.o : %.c 29 $(CC) $(CFLAGS) $(INCDIRS) -c -o $@ $< 30 %.o : %.cc 31 $(CC) $(CPPFLAGS) $(INCDIRS) -c -o $@ $< 32 %.o : %.cpp 33 $(CC) $(CPPFLAGS) $(INCDIRS) -c -o $@ $< 34 %.d : 35 @echo "Generating dependencies" $@ 36 @$(CC) -MM $(SOURCES) $(INCDIRS) \ 37 | sed 's/^\(.*\).o:/$@ \1.o:/' > $@ 20 38 21 CLEANERS = $(SUBDIRS:=.cleaner)22 23 LIBRARIES = $(SUBDIRS:=.all)24 25 26 $(PROGRAMS) : % : %.o $(LIBRARIES)27 $(G++) $(CFLAGS) -o $@ $@.o $(OBJECTS) $(LIBS)28 29 include Makefile.rules30 31 $(LIBRARIES):32 @echo " Calling make in $(@:.all=)"33 @(cd $(@:.all=); $(MAKE) -f Makefile all)34 35 $(MRPROPERS):36 @echo " Doing Mr.Proper in $(@:.mrproper=)"37 @(cd $(@:.mrproper=); $(MAKE) -f Makefile mrproper)38 39 $(CLEANERS):40 @echo " Doing clean in $(@:.cleaner=)"41 @(cd $(@:.cleaner=); $(MAKE) -f Makefile clean)42 43 mrproper: $(MRPROPERS) rmobj rmbak rmdep44 @rm -f $(PROGRAMS)45 @echo " Done."46 47 clean: $(CLEANERS) rmobj48 @echo " Done."49
Note:
See TracChangeset
for help on using the changeset viewer.