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 | videodev/Camera.cc \
|
---|
95 | videodev/Filter.cc \
|
---|
96 | videodev/Writer.cc \
|
---|
97 | MStarguider.cc \
|
---|
98 | MCosy.cc \
|
---|
99 | Starguider.cc
|
---|
100 |
|
---|
101 | SRCS = $(SRCFILES)
|
---|
102 | HEADERS = $(SRCFILES:.cc=.h)
|
---|
103 | OBJS = $(SRCFILES:.cc=.o)
|
---|
104 |
|
---|
105 | ############################################################
|
---|
106 |
|
---|
107 | all: $(PROGRAMS)
|
---|
108 |
|
---|
109 | $(SLAOBJ):
|
---|
110 | echo 'Compiling $*.c'
|
---|
111 | $(CC) -c $(CFLAGS) -pedantic $*.c -o $*.o
|
---|
112 |
|
---|
113 | #$(PROGRAMS): $(PROGRAMS:=.o) $(OBJS) $(SLAOBJ)
|
---|
114 | # @echo " Linking $@ ..."
|
---|
115 | # $(CXX) $(CXXFLAGS) $@.o $(LIBS) $(ROOTGLIBS) -o $@
|
---|
116 | $(PROGRAMS): $(SLAOBJ) $(OBJS) $(PROGRAMS:=.o)
|
---|
117 | @echo " Linking $@ ..."
|
---|
118 | $(CXX) $(CXXFLAGS) $(LIBS) $(SLAOBJ) $(OBJS) $(ROOTGLIBS) -o $@ $@.o
|
---|
119 |
|
---|
120 | #dox:
|
---|
121 | # @echo " Creating html documentation:"
|
---|
122 | # root -b -q dohtml.C
|
---|
123 |
|
---|
124 |
|
---|
125 | include Makefile.rules
|
---|
126 |
|
---|
127 | clean: rmcint rmobjs rmcore rmbin rmbak
|
---|
128 |
|
---|
129 | tar: clean
|
---|
130 | @echo "Making tar-file"
|
---|
131 | @tar -cvf ../cosy.tar *
|
---|
132 | @gzip -9 ../cosy.tar
|
---|
133 |
|
---|
134 | # @endcode
|
---|