source: trunk/MagicSoft/Cosy/Makefile@ 919

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