source: trunk/MagicSoft/Cosy/Makefile@ 854

Last change on this file since 854 was 808, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 3.4 KB
Line 
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
16CC = gcc
17CXX = g++
18AR = ar -rc
19AS = as
20LD = ld
21RANLIB = ranlib
22
23#
24# ----->>> settings for compilation
25#
26
27PROGRAMS = cosy starg
28
29ROOTFLAGS = `root-config --cflags`
30ROOTGLIBS = `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
40INCLUDES = -I. -I/usr/X11R6/include -Icandrv -Idevdrv -Ibase -Igui -Iincl -Islalib -Ivideodev -Icatalog
41LIBS = -L. -L/usr/X11R6/lib -lpthread -lpng -lz
42#INCLUDES = -I. -Ibase -Igui -Islalib
43
44WARNING = -Wall -fno-rtti -fno-exceptions
45OPTIM = -O2
46DEBUG = -g
47DEFINES = -DCPU=486 -DBUS_LITTLE_ENDIAN -DDEBUG=0 -DLINUX -DSHOW
48
49CFLAGS = $(OPTIM) $(DEBUG) $(WARNING) $(INCLUDES) $(ROOTFLAGS) $(DEFINES)
50CXXFLAGS = $(CFLAGS)
51
52CINT = M
53
54#
55# ----->>> mars libraries
56#
57
58#------------------------------------------------------------------------------
59.SILENT:
60
61.SUFFIXES: .c .cc .h .o
62
63SLASRC = 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
75SLAOBJ = $(SLASRC:.c=.o)
76
77SRCFILES = 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
102SRCS = $(SRCFILES)
103HEADERS = $(SRCFILES:.cc=.h)
104OBJS = $(SRCFILES:.cc=.o)
105
106############################################################
107
108all: $(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
126include Makefile.rules
127
128clean: rmcint rmobjs rmcore rmbin rmbak
129
130tar: clean
131 @echo "Making tar-file"
132 @tar -cvf ../cosy.tar *
133 @gzip -9 ../cosy.tar
134
135# @endcode
Note: See TracBrowser for help on using the repository browser.