################################################################## # # makefile # # for the MARS software # ################################################################## # @maintitle # @code # # ----->>> settings for compiler # CC = gcc CXX = g++ AR = ar -rc AS = as LD = ld RANLIB = ranlib # # ----->>> settings for compilation # PROGRAMS = cosy starg ROOTFLAGS = `root-config --cflags` ROOTGLIBS = `root-config --glibs` # # connect the include files defined in the config.mk file # # WARNING: the result (whether the linkage works or not) depends on the # order of the libraries # # #LIBS = -L. -L/usr/lib -lstdc++ -lpthread INCLUDES = -I. -I/usr/X11R6/include -Icandrv -Idevdrv -Ibase -Igui -Iincl -Islalib -Ivideodev -Icatalog LIBS = -L. -L/usr/X11R6/lib -lpthread -lpng -lz #INCLUDES = -I. -Ibase -Igui -Islalib WARNING = -Wall -fno-rtti -fno-exceptions OPTIM = -O2 DEBUG = -g DEFINES = -DCPU=486 -DBUS_LITTLE_ENDIAN -DDEBUG=0 -DLINUX -DSHOW CFLAGS = $(OPTIM) $(DEBUG) $(WARNING) $(INCLUDES) $(ROOTFLAGS) $(DEFINES) CXXFLAGS = $(CFLAGS) CINT = M # # ----->>> mars libraries # #------------------------------------------------------------------------------ .SILENT: .SUFFIXES: .c .cc .h .o SLASRC = slalib/cldj.c slalib/dranrm.c slalib/mappa.c slalib/aoppa.c \ slalib/mapqk.c slalib/aopqk.c slalib/epj.c slalib/evp.c \ slalib/dvn.c slalib/prenut.c slalib/geoc.c slalib/refco.c \ slalib/eqeqx.c slalib/dcs2c.c slalib/dvdv.c slalib/dmxv.c \ slalib/dcc2s.c slalib/refz.c slalib/refro.c slalib/prec.c \ slalib/nut.c slalib/dmxm.c slalib/nutc.c slalib/range.c \ slalib/aoppat.c slalib/deuler.c slalib/drange.c slalib/daf2r.c \ slalib/dh2e.c slalib/gmst.c slalib/de2h.c slalib/altaz.c \ slalib/gmsta.c slalib/dat.c slalib/dtt.c slalib/oapqk.c \ slalib/ampqk.c slalib/dimxv.c slalib/mapqkz.c slalib/dr2af.c \ slalib/dd2tf.c SLAOBJ = $(SLASRC:.c=.o) SRCFILES = candrv/vmodican.cc \ candrv/canopen.cc \ candrv/network.cc \ candrv/nodedrv.cc \ candrv/sdolist.cc \ devdrv/shaftencoder.cc \ devdrv/macs.cc \ gui/MGCosy.cc \ gui/MGImage.cc \ gui/MGCoordinate.cc \ gui/MGCoordinates.cc \ base/timer.cc \ base/msgqueue.cc \ base/File.cc \ base/MStopwatch.cc \ catalog/SaoFile.cc \ catalog/StarCatalog.cc \ videodev/Camera.cc \ videodev/Filter.cc \ videodev/Writer.cc \ MStarguider.cc \ MCosy.cc \ Starguider.cc SRCS = $(SRCFILES) HEADERS = $(SRCFILES:.cc=.h) OBJS = $(SRCFILES:.cc=.o) ############################################################ all: $(PROGRAMS) $(SLAOBJ): echo 'Compiling $*.c' $(CC) -c $(CFLAGS) -pedantic $*.c -o $*.o #$(PROGRAMS): $(PROGRAMS:=.o) $(OBJS) $(SLAOBJ) # @echo " Linking $@ ..." # $(CXX) $(CXXFLAGS) $@.o $(LIBS) $(ROOTGLIBS) -o $@ $(PROGRAMS): $(SLAOBJ) $(OBJS) $(PROGRAMS:=.o) @echo " Linking $@ ..." $(CXX) $(CXXFLAGS) $(LIBS) $(SLAOBJ) $(OBJS) $(ROOTGLIBS) -o $@ $@.o #dox: # @echo " Creating html documentation:" # root -b -q dohtml.C include Makefile.rules clean: rmcint rmobjs rmcore rmbin rmbak tar: clean @echo "Making tar-file" @tar -cvf ../cosy.tar * @gzip -9 ../cosy.tar # @endcode