source: trunk/MagicSoft/Cosy/Makefile@ 8877

Last change on this file since 8877 was 8860, checked in by tbretz, 17 years ago
*** empty log message ***
File size: 3.1 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) $(MARS_LIB)
81 @echo " Linking shared object $(SOLIB) ..."
82 $(CXX) $(CXXFLAGS) $(SOFLAG) $(OBJS) $(MARS_LIB) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
83
84$(PROGRAMS): $(PROGRAMS:=.o) $(SOLIB)
85 @echo " Linking $@ ..."
86 $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(SOLIB) $@.o -o $@
87
88rmcondor:
89 rm -f .makecondor.log
90
91condor: rmcondor $(CONDOR)
92 echo Waiting for jobs to finish...
93 condor_wait .makecondor.log
94 rm .makecondor.log
95 make -j2 $(PROGRAMS)
96# find -name "*/.makecondor.*"
97# find -maxdepth 2 -name ".makecondor.*" -exec echo {}\\\; cat {}\\\; echo {}\\\; \;
98
99dox: $(SOLIB)
100 @echo
101 @echo " Creating html documentation and logfile dohtml.log..."
102 rm -f dohtml.log
103 root -b -q dohtml.C 2>&1 >> dohtml.log | tee -a dohtml.log
104 @echo " done."
105 @echo
106
107links:
108 mkdir -p mars
109 cd mars; ln -sf ../../Mars/*/*.h .
110 ln -sf ../Mars/libmars.so .
111
112
113#clean: rmcint rmobjs rmdep rmcore rmlib
114
115mrproper: $(MRPROPERS) rmbin rmbak rmbakmac clean
116 @echo " Done."
117 @echo " "
118
119tar: mrproper
120 @echo "Making tar-file"
121 root -b -q -l -n tar.C
122# @tar cvf ../mars.tar --exclude=Root .rootrc *
123# @gzip -9 ../mars.tar
124
125#Makefile.depend:
126# (! find ./ Makefile.depend -maxdepth 1 -empty 2> /dev/null && \
127# echo " Generating dependancies into Makefile.depend" && \
128# makedepend -- $(INCLUDES) -- $(PROGRAMS:=.cc) $(SRCS) $(SUBDIRS:=/*.cc) -w1024 -f- 2> /dev/null | grep -v Cint | grep -v "/usr/" > Makefile.depend && \
129# echo " ") || find -maxdepth 0 -true > /dev/null
130#
131#depend: Makefile.depend
132
133# @endcode
Note: See TracBrowser for help on using the repository browser.