# a version of the makefile to be used if the FORTRAN code is # to be converted from FORTRAN to 'C' using f2c # No imake file exists, only Makefiles # define the default size of data arrays. This can be modified # when the program is invoked (e.g. robot -arraysize 2000) or # changed at any time with the robot command ARRAYSIZE ARRAYSIZE = 64000 # define system utilities - i.e. mail and print MAILER = /bin/mail # Either lpr, lp, or enscript/genscript may be used to print #LPR = /usr/ucb/lpr LPR = /usr/bin/lpr # installation directory - this is used both if a "make install" is # done and also used to add path to robot at top of log files #INSTDIR = $(HOME)/bin/ INSTDIR = /usr/local/bin # define compilers; gcc seems to give rather faster code than # the standard Sun compiler CC = gcc # CC = gcc -traditional # CC = cc # FORTRAN to C converter F2C = f2c # define compile options here if required, # e.g. debug # CFLAGS = -g # or optimize (if you have enough swap space) #CFLAGS = -O # or nothing at all CFLAGS = # if USA is defined we make some attempt to use USA spellings LANGUAGE = -DUSA #LANGUAGE = -DUK # static build to allow use on other systems without XView etc. LDFLAG = -static #LDFLAG = -Bstatic #LDFLAG = # specify here the directory where the openwindow include # files are kept # INCLUDE = /usr/local/openwin/include INCLUDE = $(OPENWINHOME)/include # location of f2c includes F2CINC = /usr/local/include # location of f2c library #F2CLIB = /bulk/corbet1/corbet/F2c/libf2c.a F2CLIB = -lf2c # location of the C version of the FITS library FITSDIR = ../Fitsioc/ FITSLIB = $(FITSDIR)libfits.a # This specifies the location of the graphics routines in # the ARK directory ARKDIR = ../ARKc/ ARKLIB = $(ARKDIR)libark.a OBJS = robot.o subroutines.o subroutines2.o subroutines3.o \ user.o main.o rfitsf.o rfitsc.o fits3d.o york.o classify.o nr.o colors.o \ browser.o about.o history.o fitter.o dnd.o math.o axes.o zoom.o \ specials.o split.o text_editor.o canvas_menu.o sheet.o register.o robot: $(OBJS) makefile.f2c FITSLIB ARKLIB $(CC) $(OBJS)\ $(LDFLAG)\ $(FITSLIB)\ $(ARKLIB)\ $(F2CLIB) \ -lm\ -lc \ $(OPENWINHOME)/lib/libxview.a\ $(OPENWINHOME)/lib/libolgx.a\ -L/usr/X11/lib\ -lX11\ $(CFLAGS) -o robot FITSLIB: (cd $(FITSDIR); make libfits.a) ARKLIB: (cd $(ARKDIR); make libark.a "LPR=$(LPR)") browser.o: browser.c $(CC) -c $(CFLAGS) browser.c -I$(INCLUDE) about.o: about.c $(CC) -c $(CFLAGS) about.c -I$(INCLUDE) $(LANGUAGE) -DMAILER=\"$(MAILER)\" -DWEB_HELP=\"$(WEB_HELP)\" -DBROWSER=\"$(BROWSER)\" history.o: history.c $(CC) -c $(CFLAGS) history.c -I$(INCLUDE) canvas_menu.o: canvas_menu.c $(CC) -c $(CFLAGS) canvas_menu.c -I$(INCLUDE) text_editor.o: text_editor.c $(CC) -c $(CFLAGS) text_editor.c -I$(INCLUDE) axes.o: axes.c $(CC) -c $(CFLAGS) axes.c -I$(INCLUDE) zoom.o: zoom.c $(CC) -c $(CFLAGS) zoom.c -I$(INCLUDE) specials.o: specials.c $(CC) -c $(CFLAGS) specials.c -I$(INCLUDE) sheet.o: sheet.c $(CC) -c $(CFLAGS) sheet.c -I$(INCLUDE) $(LANGUAGE) register.o: register.c patchlevel.h robot.h $(CC) -c $(CFLAGS) register.c -I$(INCLUDE) $(LANGUAGE) -DMAILER=\"$(MAILER)\" split.o: split.c $(CC) -c $(CFLAGS) split.c -I$(INCLUDE) dnd.o: dnd.c $(CC) -c $(CFLAGS) dnd.c -I$(INCLUDE) math.o: math.c $(CC) -c $(CFLAGS) math.c robot.o: robot.c $(CC) -c $(CFLAGS) robot.c -I$(F2CINC) robot.c: robot.f robcom msizcom fitcom $(F2C) -Nn 600 -Nx 300 robot.f subroutines.o: subroutines.c $(CC) -c $(CFLAGS) subroutines.c -I$(F2CINC) subroutines.c: subroutines.f robcom fitcom $(F2C) subroutines.f subroutines2.o: subroutines2.c $(CC) -c $(CFLAGS) subroutines2.c -I$(F2CINC) subroutines2.c: subroutines2.f robcom msizcom fitcom $(F2C) subroutines2.f subroutines3.o: subroutines3.c $(CC) -c $(CFLAGS) subroutines3.c -I$(F2CINC) subroutines3.c: subroutines3.f robcom msizcom $(F2C) subroutines3.f nr.o: nr.c $(CC) -c $(CFLAGS) nr.c -I$(F2CINC) nr.c: nr.f robcom $(F2C) nr.f main.o: main.c robot.h patchlevel.h $(CC) -c $(CFLAGS) main.c -I$(INCLUDE) $(LANGUAGE) -DARRAYSIZE=$(ARRAYSIZE) -DINSTDIR=\"$(INSTDIR)\" colors.o: colors.c $(CC) -c $(CFLAGS) colors.c -I$(INCLUDE) $(LANGUAGE) fitter.o: fitter.c $(CC) -c $(CFLAGS) fitter.c -I$(INCLUDE) $(LANGUAGE) user.o: user.c $(CC) -c $(CFLAGS) user.c -I$(F2CINC) user.c: user.f $(F2C) user.f york.o: york.c $(CC) -c $(CFLAGS) york.c -I$(F2CINC) york.c: york.f $(F2C) york.f rfitsf.o: rfitsf.c $(CC) -c $(CFLAGS) rfitsf.c -I$(F2CINC) rfitsf.c: rfitsf.f robcom $(F2C) rfitsf.f rfitsc.o: rfitsc.c $(CC) -c $(CFLAGS) rfitsc.c -I$(F2CINC) fits3d.o: fits3d.c $(CC) -c $(CFLAGS) fits3d.c -I$(F2CINC) fits3d.c: fits3d.f robcom $(F2C) fits3d.f classify.o: classify.c $(CC) -c $(CFLAGS) classify.c backup: cp $(INSTDIR)/robot $(INSTDIR)/robot.old install: mv robot $(INSTDIR) clean: rm -f *.o *% core robot.trace veryclean: rm -f *.o *% core robot.trace robot