source: trunk/MagicSoft/Cosy/Makefile@ 9488

Last change on this file since 9488 was 9417, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 3.2 KB
Line 
1##################################################################
2#
3# makefile
4#
5# for the COSY software
6#
7##################################################################
8# @maintitle
9
10# @code
11
12#
13# please change all system depend values in the
14# config.mk.${OSTYPE} file
15#
16#
17include Makefile.conf.$(OSTYPE)
18include Makefile.conf.general
19
20#
21PROGRAMS = cosy telesto
22SOLIB = libcosy.so
23CINT = M
24MARS_LIB = libmars.so
25
26INCLUDES = -I. -Imain -Imars -Ibase -Icandrv -Iincl -Ivideodev \
27 -Igui -Itcpip -Itpoint
28
29#
30# connect the include files defined in the config.mk file
31#
32# WARNING: the result (whether the linkage works or not) depends on the
33# order of the libraries. It seems, that the most base library
34# must be the last one
35#
36
37#
38# ----->>> mars libraries
39#
40SUBDIRS = base \
41 candrv \
42 caos \
43 catalog \
44 devdrv \
45 gui \
46 main \
47 slalib \
48 tcpip \
49 videodev \
50 tpoint
51
52#LIBRARIES = $(SUBDIRS:%=lib/lib%.a)
53LIBRARIES = $(SUBDIRS:=.a)
54CONDOR = $(SUBDIRS:=.condor)
55MRPROPERS = $(SUBDIRS:=.mrproper)
56CLEANERS = $(SUBDIRS:=.clean)
57LIBS = $(SOLIB)
58
59#------------------------------------------------------------------------------
60.SUFFIXES: .c .cc .h .o .cxx .hxx .gch
61
62SRCFILES =
63
64############################################################
65all: $(SOLIB) $(PROGRAMS)
66 @echo " Done. "
67 @echo " "
68
69static: LIBS=$(SUBDIRS:=/*.o) $(OBJS)
70#static: rmlib $(LIBRARIES) $(PROGRAMS)
71static: $(LIBRARIES) $(PROGRAMS)
72 @echo " Done. "
73 @echo " "
74
75include Makefile.rules
76
77#
78# Use $(CXX) -v ... for a more verbose output
79#
80$(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS)
81 @echo " Linking shared object $(SOLIB) ..."
82 $(CXX) $(CXXFLAGS) $(SOFLAG) $(OBJS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
83
84$(PROGRAMS): $(PROGRAMS:=.o) $(SOLIB) $(MARS_LIB)
85 @echo " Linking $@ ..."
86 $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(SOLIB) $(MARS_LIB) $@.o -o $@
87# $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(SUBDIRS:=/*.o) ../Mars/*/*.o $@.o -o $@
88
89rmcondor:
90 rm -f .makecondor.log
91
92condor: rmcondor $(CONDOR)
93 echo Waiting for jobs to finish...
94 condor_wait .makecondor.log
95 rm .makecondor.log
96 make -j2 $(PROGRAMS)
97# find -name "*/.makecondor.*"
98# find -maxdepth 2 -name ".makecondor.*" -exec echo {}\\\; cat {}\\\; echo {}\\\; \;
99
100dox: $(SOLIB)
101 @echo
102 @echo " Creating html documentation and logfile dohtml.log..."
103 rm -f dohtml.log
104 root -b -q dohtml.C 2>&1 >> dohtml.log | tee -a dohtml.log
105 @echo " done."
106 @echo
107
108links:
109 mkdir -p mars
110 cd mars; ln -sf ../../Mars/*/*.h .
111 ln -sf ../Mars/libmars.so .
112
113
114#clean: rmcint rmobjs rmdep rmcore rmlib
115
116mrproper: $(MRPROPERS) rmbin rmbak rmbakmac clean
117 @echo " Done."
118 @echo " "
119
120tar: mrproper
121 @echo "Making tar-file"
122 root -b -q -l -n tar.C
123# @tar cvf ../mars.tar --exclude=Root .rootrc *
124# @gzip -9 ../mars.tar
125
126#Makefile.depend:
127# (! find ./ Makefile.depend -maxdepth 1 -empty 2> /dev/null && \
128# echo " Generating dependancies into Makefile.depend" && \
129# makedepend -- $(INCLUDES) -- $(PROGRAMS:=.cc) $(SRCS) $(SUBDIRS:=/*.cc) -w1024 -f- 2> /dev/null | grep -v Cint | grep -v "/usr/" > Makefile.depend && \
130# echo " ") || find -maxdepth 0 -true > /dev/null
131#
132#depend: Makefile.depend
133
134# @endcode
Note: See TracBrowser for help on using the repository browser.