source: trunk/MagicSoft/Cosy/Makefile@ 738

Last change on this file since 738 was 738, checked in by tbretz, 24 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 videodev/Camera.cc \
95 videodev/Filter.cc \
96 videodev/Writer.cc \
97 MStarguider.cc \
98 MCosy.cc \
99 Starguider.cc
100
101SRCS = $(SRCFILES)
102HEADERS = $(SRCFILES:.cc=.h)
103OBJS = $(SRCFILES:.cc=.o)
104
105############################################################
106
107all: $(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
125include Makefile.rules
126
127clean: rmcint rmobjs rmcore rmbin rmbak
128
129tar: clean
130 @echo "Making tar-file"
131 @tar -cvf ../cosy.tar *
132 @gzip -9 ../cosy.tar
133
134# @endcode
Note: See TracBrowser for help on using the repository browser.