Changeset 35 for hvcontrol/Makefile


Ignore:
Timestamp:
04/24/09 14:06:49 (16 years ago)
Author:
lstark
Message:
Calibration table (DAC - HV values) integrated
File:
1 edited

Legend:

Unmodified
Added
Removed
  • hvcontrol/Makefile

    r14 r35  
    11#
    2 #  Makefile for the CTX HV utility
     2#  Makefile example
    33#
    44
    5 include Makefile.general
     5SOURCES = 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
    66
    7 PROGRAMS = hvcontrol remotecontrol
     7OBJECTS = $(addsuffix .o, $(basename $(SOURCES)))
    88
    9 SUBDIRS = src
     9#INCDIRS   = -I. -IDRS -I../pixelmap
     10INCDIRS   = -I. -I../pixelmap -I./src
    1011
     12CFLAGS = -pipe -fthread-jumps -funroll-all-loops -O3 -Wall -DOS_LINUX
     13CPPFLAGS = -pipe -fPIC -fthread-jumps -funroll-all-loops -O3 -Wall -DOS_LINUX $(VMECTRL)
     14LIBS = -lstdc++ -lz -lpthread -lutil -lfl -lusb -lftdi -L/usr/lib -L/sw/lib
    1115
    12 all: $(PROGRAMS)
     16hvcontrol: $(OBJECTS)
     17        $(CC) $(CPPFLAGS) -o $@ $(OBJECTS) $(LIBS)
    1318
     19clean:
     20        @rm -f $(OBJECTS) $(SOBJECTS).so
     21        @rm -f *.d
     22        @rm -f *~
    1423
    15 OBJECTS   = $(SUBDIRS:=/*.o)
     24-include Dep.d
    1625
    17 INCDIRS   = -I. $(SUBDIRS:%=-I%)
     26# Implicit rules
    1827
    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:/' > $@
    2038
    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.rules
    30 
    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 rmdep
    44         @rm -f $(PROGRAMS)
    45         @echo " Done."
    46 
    47 clean: $(CLEANERS) rmobj
    48         @echo " Done."
    49 
Note: See TracChangeset for help on using the changeset viewer.