source: trunk/Cosy/Makefile@ 13178

Last change on this file since 13178 was 10026, checked in by tbretz, 14 years ago
Removed necessity of defining OSTYPE.
File size: 3.5 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.general
18include Makefile.conf.$(OSTYPE)
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
113magic1:
114 ln -sf .cosyrc_magic1 .cosyrc
115 ln -sf prepos_magic1.txt prepos.txt
116 ln -sf leds_magic1.txt leds.txt
117 ln -sf stargleds_magic1.txt stargleds.txt
118 ln -sf bending_magic1.txt bending.txt
119
120magic2:
121 ln -sf .cosyrc_magic2 .cosyrc
122 ln -sf prepos_magic2.txt prepos.txt
123 ln -sf leds_magic2.txt leds.txt
124 ln -sf stargleds_magic2.txt stargleds.txt
125 ln -sf bending_magic2.txt bending.txt
126
127
128#clean: rmcint rmobjs rmdep rmcore rmlib
129
130mrproper: $(MRPROPERS) rmbin rmbak rmbakmac clean
131 @echo " Done."
132 @echo " "
133
134tar: mrproper
135 @echo "Making tar-file"
136 root -b -q -l -n tar.C
137# @tar cvf ../mars.tar --exclude=Root .rootrc *
138# @gzip -9 ../mars.tar
139
140#Makefile.depend:
141# (! find ./ Makefile.depend -maxdepth 1 -empty 2> /dev/null && \
142# echo " Generating dependancies into Makefile.depend" && \
143# makedepend -- $(INCLUDES) -- $(PROGRAMS:=.cc) $(SRCS) $(SUBDIRS:=/*.cc) -w1024 -f- 2> /dev/null | grep -v Cint | grep -v "/usr/" > Makefile.depend && \
144# echo " ") || find -maxdepth 0 -true > /dev/null
145#
146#depend: Makefile.depend
147
148# @endcode
Note: See TracBrowser for help on using the repository browser.