1 | ##################################################################
|
---|
2 | #
|
---|
3 | # makefile
|
---|
4 | #
|
---|
5 | # for the MARS software
|
---|
6 | #
|
---|
7 | ##################################################################
|
---|
8 | # @maintitle
|
---|
9 |
|
---|
10 | # @code
|
---|
11 |
|
---|
12 | #
|
---|
13 | # ----->>> settings for compiler
|
---|
14 | #
|
---|
15 |
|
---|
16 | CC = gcc
|
---|
17 | CXX = g++
|
---|
18 | AR = ar -rc
|
---|
19 | AS = as
|
---|
20 | LD = ld
|
---|
21 | RANLIB = ranlib
|
---|
22 |
|
---|
23 | #
|
---|
24 | # ----->>> settings for compilation
|
---|
25 | #
|
---|
26 |
|
---|
27 | PROGRAMS = cosy starg
|
---|
28 |
|
---|
29 | ROOTFLAGS = `root-config --cflags`
|
---|
30 | ROOTGLIBS = `root-config --glibs`
|
---|
31 |
|
---|
32 | #
|
---|
33 | # connect the include files defined in the config.mk file
|
---|
34 | #
|
---|
35 | # WARNING: the result (whether the linkage works or not) depends on the
|
---|
36 | # order of the libraries
|
---|
37 | #
|
---|
38 | #
|
---|
39 | #LIBS = -L. -L/usr/lib -lstdc++ -lpthread
|
---|
40 | INCLUDES = -I. -I/usr/X11R6/include -Icandrv -Idevdrv -Ibase -Igui -Iincl -Islalib -Ivideodev -Icatalog
|
---|
41 | LIBS = -L. -L/usr/X11R6/lib -lpthread -lpng -lz
|
---|
42 | #INCLUDES = -I. -Ibase -Igui -Islalib
|
---|
43 |
|
---|
44 | WARNING = -Wall -fno-rtti -fno-exceptions
|
---|
45 | OPTIM = -O2
|
---|
46 | DEBUG = -g
|
---|
47 | DEFINES = -DCPU=486 -DBUS_LITTLE_ENDIAN -DDEBUG=0 -DLINUX -DSHOW
|
---|
48 |
|
---|
49 | CFLAGS = $(OPTIM) $(DEBUG) $(WARNING) $(INCLUDES) $(ROOTFLAGS) $(DEFINES)
|
---|
50 | CXXFLAGS = $(CFLAGS)
|
---|
51 |
|
---|
52 | CINT = M
|
---|
53 |
|
---|
54 | #
|
---|
55 | # ----->>> mars libraries
|
---|
56 | #
|
---|
57 |
|
---|
58 | #------------------------------------------------------------------------------
|
---|
59 | .SILENT:
|
---|
60 |
|
---|
61 | .SUFFIXES: .c .cc .h .o
|
---|
62 |
|
---|
63 | SLASRC = slalib/cldj.c slalib/dranrm.c slalib/mappa.c slalib/aoppa.c \
|
---|
64 | slalib/mapqk.c slalib/aopqk.c slalib/epj.c slalib/evp.c \
|
---|
65 | slalib/dvn.c slalib/prenut.c slalib/geoc.c slalib/refco.c \
|
---|
66 | slalib/eqeqx.c slalib/dcs2c.c slalib/dvdv.c slalib/dmxv.c \
|
---|
67 | slalib/dcc2s.c slalib/refz.c slalib/refro.c slalib/prec.c \
|
---|
68 | slalib/nut.c slalib/dmxm.c slalib/nutc.c slalib/range.c \
|
---|
69 | slalib/aoppat.c slalib/deuler.c slalib/drange.c slalib/daf2r.c \
|
---|
70 | slalib/dh2e.c slalib/gmst.c slalib/de2h.c slalib/altaz.c \
|
---|
71 | slalib/gmsta.c slalib/dat.c slalib/dtt.c slalib/oapqk.c \
|
---|
72 | slalib/ampqk.c slalib/dimxv.c slalib/mapqkz.c slalib/dr2af.c \
|
---|
73 | slalib/dd2tf.c
|
---|
74 |
|
---|
75 | SLAOBJ = $(SLASRC:.c=.o)
|
---|
76 |
|
---|
77 | SRCFILES = candrv/vmodican.cc \
|
---|
78 | candrv/canopen.cc \
|
---|
79 | candrv/network.cc \
|
---|
80 | candrv/nodedrv.cc \
|
---|
81 | candrv/sdolist.cc \
|
---|
82 | devdrv/shaftencoder.cc \
|
---|
83 | devdrv/macs.cc \
|
---|
84 | gui/MGCosy.cc \
|
---|
85 | gui/MGImage.cc \
|
---|
86 | gui/MGCoordinate.cc \
|
---|
87 | gui/MGCoordinates.cc \
|
---|
88 | base/timer.cc \
|
---|
89 | base/msgqueue.cc \
|
---|
90 | base/File.cc \
|
---|
91 | base/MStopwatch.cc \
|
---|
92 | catalog/SaoFile.cc \
|
---|
93 | catalog/StarCatalog.cc \
|
---|
94 | catalog/Slalib.cc \
|
---|
95 | videodev/Camera.cc \
|
---|
96 | videodev/Filter.cc \
|
---|
97 | videodev/Writer.cc \
|
---|
98 | MStarguider.cc \
|
---|
99 | MCosy.cc \
|
---|
100 | Starguider.cc
|
---|
101 |
|
---|
102 | SRCS = $(SRCFILES)
|
---|
103 | HEADERS = $(SRCFILES:.cc=.h)
|
---|
104 | OBJS = $(SRCFILES:.cc=.o)
|
---|
105 |
|
---|
106 | ############################################################
|
---|
107 |
|
---|
108 | all: $(PROGRAMS)
|
---|
109 |
|
---|
110 | $(SLAOBJ):
|
---|
111 | echo 'Compiling $*.c'
|
---|
112 | $(CC) -c $(CFLAGS) -pedantic $*.c -o $*.o
|
---|
113 |
|
---|
114 | #$(PROGRAMS): $(PROGRAMS:=.o) $(OBJS) $(SLAOBJ)
|
---|
115 | # @echo " Linking $@ ..."
|
---|
116 | # $(CXX) $(CXXFLAGS) $@.o $(LIBS) $(ROOTGLIBS) -o $@
|
---|
117 | $(PROGRAMS): $(SLAOBJ) $(OBJS) $(PROGRAMS:=.o)
|
---|
118 | @echo " Linking $@ ..."
|
---|
119 | $(CXX) $(CXXFLAGS) $(LIBS) $(SLAOBJ) $(OBJS) $(ROOTGLIBS) -o $@ $@.o
|
---|
120 |
|
---|
121 | #dox:
|
---|
122 | # @echo " Creating html documentation:"
|
---|
123 | # root -b -q dohtml.C
|
---|
124 |
|
---|
125 |
|
---|
126 | include Makefile.rules
|
---|
127 |
|
---|
128 | clean: rmcint rmobjs rmcore rmbin rmbak
|
---|
129 |
|
---|
130 | tar: clean
|
---|
131 | @echo "Making tar-file"
|
---|
132 | @tar -cvf ../cosy.tar *
|
---|
133 | @gzip -9 ../cosy.tar
|
---|
134 |
|
---|
135 | # @endcode
|
---|