source: trunk/MagicSoft/Cosy/Makefile@ 8809

Last change on this file since 8809 was 8809, 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 readcam
22SOLIB = cosy.so
23CINT = M
24MARS_LIB = libmars.so
25
26INCLUDES = -I. -Imain -Imars -Ibase -Icandrv -Iincl -Ivideodev -Igui -Imvideo -Itcpip
27
28#
29# connect the include files defined in the config.mk file
30#
31# WARNING: the result (whether the linkage works or not) depends on the
32# order of the libraries. It seems, that the most base library
33# must be the last one
34#
35
36#
37# ----->>> mars libraries
38#
39SUBDIRS = base \
40 candrv \
41 caos \
42 catalog \
43 devdrv \
44 gui \
45 main \
46 slalib \
47 tcpip \
48 videodev \
49 mvideo
50
51#LIBRARIES = $(SUBDIRS:%=lib/lib%.a)
52LIBRARIES = $(SUBDIRS:=.a)
53CONDOR = $(SUBDIRS:=.condor)
54MRPROPERS = $(SUBDIRS:=.mrproper)
55CLEANERS = $(SUBDIRS:=.clean)
56LIBS = $(SOLIB)
57
58#------------------------------------------------------------------------------
59.SUFFIXES: .c .cc .h .o .cxx .hxx .gch
60
61SRCFILES =
62
63############################################################
64all: $(SOLIB) $(PROGRAMS)
65 @echo " Done. "
66 @echo " "
67
68static: LIBS=$(SUBDIRS:=/*.o) $(OBJS)
69#static: rmlib $(LIBRARIES) $(PROGRAMS)
70static: $(LIBRARIES) $(PROGRAMS)
71 @echo " Done. "
72 @echo " "
73
74include Makefile.rules
75
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 $@
82
83$(PROGRAMS): $(PROGRAMS:=.o) $(SOLIB)
84 @echo " Linking $@ ..."
85 $(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(SOLIB) $@.o -o $@
86
87rmcondor:
88 rm -f .makecondor.log
89
90condor: 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
98dox: $(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
105
106links:
107 mkdir -p mars
108 cd mars; ln -sf ../../Mars/*/*.h .
109 ln -sf ../Mars/libmars.so .
110
111
112#clean: rmcint rmobjs rmdep rmcore rmlib
113
114mrproper: $(MRPROPERS) rmbin rmbak rmbakmac clean
115 @echo " Done."
116 @echo " "
117
118tar: mrproper
119 @echo "Making tar-file"
120 root -b -q -l -n tar.C
121# @tar cvf ../mars.tar --exclude=Root .rootrc *
122# @gzip -9 ../mars.tar
123
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
131
132# @endcode
Note: See TracBrowser for help on using the repository browser.