source: trunk/MagicSoft/Cosy/Makefile@ 1170

Last change on this file since 1170 was 924, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 2.7 KB
Line 
1##################################################################
2#
3# makefile
4#
5# for the MARS 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#
21
22PROGRAMS = cosy starg
23SOLIB =
24CINT = M
25INCLUDES = -I. -Imain -Ibase -Icandrv -Iincl -Igui -Ivideodev -Icatalog
26LIBS = -lpng -lz -L/usr/X11R6/lib -lpthread
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 = \
40 main \
41 gui \
42 candrv \
43 catalog \
44 devdrv \
45 videodev \
46 base \
47 slalib
48
49LIBRARIES = $(SUBDIRS:=.a)
50
51#------------------------------------------------------------------------------
52
53.SUFFIXES: .c .cc .h .o
54
55SRCFILES =
56
57SRCS = $(SRCFILES)
58HEADERS = $(SRCFILES:.cc=.h)
59OBJS = $(SRCFILES:.cc=.o)
60
61############################################################
62
63all: rmlib $(PROGRAMS) $(SOLIB)
64
65# Use $(CXX) -v ... for a more verbose output
66#
67# We could link mars.so instead of all libraries. This would need
68# some MBs less space on the HD. But this means, that the Shared
69# Library Path in your system must be set properly to be able to start
70# 'mars'
71#
72$(PROGRAMS): $(LIBRARIES) $(OBJS) $(HEADERS) $(PROGRAMS:=.o)
73 @echo " Linking $@ ..."
74 $(CXX) $(CXXFLAGS) $(LIBS) $@.o $(OBJS) $(MARS_LIB) $(ROOTGLIBS) -o $@
75
76$(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS) MCint.o
77 @echo " Linking $(SOLIB) ..."
78 $(CXX) -shared $(CXXFLAGS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
79 mv cosy.so lib
80
81$(LIBRARIES):
82 @echo " "
83 @echo " Creating lib$@:"
84 (cd $*; make -f Makefile; cd ..; mv $*/$@ lib/lib$@)
85
86dox:
87 @echo " Creating html documentation:"
88 root -b -q dohtml.C
89
90include Makefile.rules
91
92clean: rmlib rmcint rmobjs rmcore rmbin
93
94mrproper: clean rmbak
95 @rm -f macros/*~
96 @rm -rf htmldoc
97 @echo "cd base"
98 @cd base; make mrproper; cd ..
99 @echo "cd .."
100 @echo "cd candrv"
101 @cd candrv; make mrproper; cd ..
102 @echo "cd .."
103 @echo "cd devdrv"
104 @cd devdrv; make mrproper; cd ..
105 @echo "cd .."
106 @echo "cd gui"
107 @cd gui; make mrproper; cd ..
108 @echo "cd .."
109 @echo "cd videodev"
110 @cd videodev; make mrproper; cd ..
111 @echo "cd .."
112 @echo "cd catalog"
113 @cd catalog; make mrproper; cd ..
114 @echo "cd .."
115 @echo "cd main"
116 @cd main; make mrproper; cd ..
117 @echo "cd .."
118
119tar: mrproper
120 @echo "Making tar-file"
121 @tar -cvf ../cosy.tar *
122 @gzip -9 ../cosy.tar
123
124# @endcode
Note: See TracBrowser for help on using the repository browser.