Changeset 8809 for trunk/MagicSoft/Cosy/Makefile
- Timestamp:
- 01/16/08 09:59:03 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/Makefile
r7787 r8809 3 3 # makefile 4 4 # 5 # for the MARSsoftware5 # for the COSY software 6 6 # 7 7 ################################################################## … … 19 19 20 20 # 21 22 PROGRAMS = testse starg cosy bend 21 PROGRAMS = cosy readcam 23 22 SOLIB = cosy.so 24 23 CINT = M 25 INCLUDES = -I. -Imain -Ibase -Icandrv -Iincl -Igui -Ivideodev -Icatalog -Idevdrv -Imars 26 LIBS = -lpng -lz -L/usr/X11R6/lib -lpthread libmars.so 24 MARS_LIB = libmars.so 25 26 INCLUDES = -I. -Imain -Imars -Ibase -Icandrv -Iincl -Ivideodev -Igui -Imvideo -Itcpip 27 27 28 28 # … … 37 37 # ----->>> mars libraries 38 38 # 39 SUBDIRS = \40 main\41 tcpip\42 gui\43 catalog\44 videodev\45 devdrv\46 candrv\47 caos\48 base\49 slalib39 SUBDIRS = base \ 40 candrv \ 41 caos \ 42 catalog \ 43 devdrv \ 44 gui \ 45 main \ 46 slalib \ 47 tcpip \ 48 videodev \ 49 mvideo 50 50 51 #LIBRARIES = $(SUBDIRS:%=lib/lib%.a) 51 52 LIBRARIES = $(SUBDIRS:=.a) 53 CONDOR = $(SUBDIRS:=.condor) 54 MRPROPERS = $(SUBDIRS:=.mrproper) 55 CLEANERS = $(SUBDIRS:=.clean) 56 LIBS = $(SOLIB) 52 57 53 58 #------------------------------------------------------------------------------ 59 .SUFFIXES: .c .cc .h .o .cxx .hxx .gch 54 60 55 .SUFFIXES: .c .cc .h .o 56 57 SRCFILES = 58 59 SRCS = $(SRCFILES) 60 HEADERS = $(SRCFILES:.cc=.h) 61 OBJS = $(SRCFILES:.cc=.o) 61 SRCFILES = 62 62 63 63 ############################################################ 64 all: $(SOLIB) $(PROGRAMS) 65 @echo " Done. " 66 @echo " " 64 67 65 all: rmlib $(PROGRAMS) $(SOLIB) 66 67 # Use $(CXX) -v ... for a more verbose output 68 # 69 # We could link mars.so instead of all libraries. This would need 70 # some MBs less space on the HD. But this means, that the Shared 71 # Library Path in your system must be set properly to be able to start 72 # 'mars' 73 # 74 $(PROGRAMS): $(LIBRARIES) $(OBJS) $(HEADERS) $(PROGRAMS:=.o) 75 @echo " Linking $@ ..." 76 $(CXX) $(CXXFLAGS) $(LIBS) $(OBJS) $@.o $(MARS_LIB) $(ROOTGLIBS) -o $@ 77 78 $(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS) 79 @echo " Linking $(SOLIB) ..." 80 $(CXX) -shared $(CXXFLAGS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@ 81 mv cosy.so lib 82 83 $(LIBRARIES): 84 @echo " " 85 @echo " Creating lib$@:" 86 (cd $*; make -f Makefile; cd ..; mv $*/$@ lib/lib$@) 87 88 dox: 89 @echo " Creating html documentation:" 90 root -b -q dohtml.C 68 static: LIBS=$(SUBDIRS:=/*.o) $(OBJS) 69 #static: rmlib $(LIBRARIES) $(PROGRAMS) 70 static: $(LIBRARIES) $(PROGRAMS) 71 @echo " Done. " 72 @echo " " 91 73 92 74 include Makefile.rules 93 75 94 clean: rmlib rmcint rmobjs rmcore rmbin 76 # 77 # Use $(CXX) -v ... for a more verbose output 78 # 79 $(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS) $(MARS_LIB) 80 @echo " Linking shared object $(SOLIB) ..." 81 $(CXX) $(CXXFLAGS) $(SOFLAG) $(OBJS) $(MARS_LIB) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@ 95 82 96 mrproper: clean rmbak 97 @rm -f macros/*~ 98 @rm -rf htmldoc 99 @echo "cd base" 100 @cd base; make mrproper; cd .. 101 @echo "cd .." 102 @echo "cd caos" 103 @cd caos; make mrproper; cd .. 104 @echo "cd .." 105 @echo "cd candrv" 106 @cd candrv; make mrproper; cd .. 107 @echo "cd .." 108 @echo "cd devdrv" 109 @cd devdrv; make mrproper; cd .. 110 @echo "cd .." 111 @echo "cd gui" 112 @cd gui; make mrproper; cd .. 113 @echo "cd .." 114 @echo "cd videodev" 115 @cd videodev; make mrproper; cd .. 116 @echo "cd .." 117 @echo "cd tcpip" 118 @cd tcpip; make mrproper; cd .. 119 @echo "cd .." 120 @echo "cd catalog" 121 @cd catalog; make mrproper; cd .. 122 @echo "cd .." 123 @echo "cd main" 124 @cd main; make mrproper; cd .. 125 @echo "cd .." 83 $(PROGRAMS): $(PROGRAMS:=.o) $(SOLIB) 84 @echo " Linking $@ ..." 85 $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(SOLIB) $@.o -o $@ 86 87 rmcondor: 88 rm -f .makecondor.log 89 90 condor: rmcondor $(CONDOR) 91 echo Waiting for jobs to finish... 92 condor_wait .makecondor.log 93 rm .makecondor.log 94 make -j2 $(PROGRAMS) 95 # find -name "*/.makecondor.*" 96 # find -maxdepth 2 -name ".makecondor.*" -exec echo {}\\\; cat {}\\\; echo {}\\\; \; 97 98 dox: $(SOLIB) 99 @echo 100 @echo " Creating html documentation and logfile dohtml.log..." 101 rm -f dohtml.log 102 root -b -q dohtml.C 2>&1 >> dohtml.log | tee -a dohtml.log 103 @echo " done." 104 @echo 126 105 127 106 links: 128 @ln -sf /home/caos/March06/Mars/*/*.h mars 129 @ln -sf /home/caos/March06/Mars/libmars.so 107 mkdir -p mars 108 cd mars; ln -sf ../../Mars/*/*.h . 109 ln -sf ../Mars/libmars.so . 130 110 131 magic:132 @ln -sf bending_magic.txt bending.txt133 @ln -sf prepos_magic.txt prepos.txt134 @ln -sf .cosyrc_magic .cosyrc135 111 136 model: 137 @ln -sf bending_model.txt bending.txt 138 @ln -sf prepos_model.txt prepos.txt 139 @ln -sf .cosyrc_model .cosyrc 112 #clean: rmcint rmobjs rmdep rmcore rmlib 113 114 mrproper: $(MRPROPERS) rmbin rmbak rmbakmac clean 115 @echo " Done." 116 @echo " " 140 117 141 118 tar: mrproper 142 119 @echo "Making tar-file" 143 @tar -cvf ../cosy.tar * 144 @gzip -9 ../cosy.tar 120 root -b -q -l -n tar.C 121 # @tar cvf ../mars.tar --exclude=Root .rootrc * 122 # @gzip -9 ../mars.tar 145 123 146 install: 147 @echo Installing cosy to ~stesy/Cosy 148 @echo Copy 'cosy' 149 @chmod u+w /home/stesy/Cosy/cosy 150 @cp cosy /home/stesy/Cosy/ 151 @chmod a-w /home/stesy/Cosy/cosy 152 @echo Copy cosy resources '.cosyrc' 153 @chmod u+w /home/stesy/Cosy/.cosyrc 154 @cp .cosyrc /home/stesy/Cosy/ 155 @chmod a-w /home/stesy/Cosy/.cosyrc 156 @echo Copy bending model 'bending.txt' 157 @chmod u+w /home/stesy/Cosy/bending.txt 158 @cp bending.txt /home/stesy/Cosy 159 @chmod a-w /home/stesy/Cosy/bending.txt 160 @echo Copy LED offsets 'leds.txt' 161 @chmod u+w /home/stesy/Cosy/leds.txt 162 @cp leds.txt /home/stesy/Cosy/ 163 @chmod a-w /home/stesy/Cosy/leds.txt 164 @echo Copy predefined positions 'prepos.txt' 165 @chmod u+w /home/stesy/Cosy/prepos.txt 166 @cp prepos.txt /home/stesy/Cosy/ 167 @chmod a-w /home/stesy/Cosy/prepos.txt 168 @echo Copy star catalog 'stars.txt' 169 @chmod u+w /home/stesy/Cosy/stars.txt 170 @cp stars.txt /home/stesy/Cosy/ 171 @chmod a-w /home/stesy/Cosy/stars.txt 172 @echo Copy PPM catalog 173 @chmod u+w /home/stesy/Cosy/ppm9.bin 174 @cp ppm9.bin /home/stesy/Cosy/ 175 @chmod a-w /home/stesy/Cosy/ppm9.bin 176 @echo finished... 124 #Makefile.depend: 125 # (! find ./ Makefile.depend -maxdepth 1 -empty 2> /dev/null && \ 126 # echo " Generating dependancies into Makefile.depend" && \ 127 # makedepend -- $(INCLUDES) -- $(PROGRAMS:=.cc) $(SRCS) $(SUBDIRS:=/*.cc) -w1024 -f- 2> /dev/null | grep -v Cint | grep -v "/usr/" > Makefile.depend && \ 128 # echo " ") || find -maxdepth 0 -true > /dev/null 129 # 130 #depend: Makefile.depend 177 131 178 132 # @endcode
Note:
See TracChangeset
for help on using the changeset viewer.