# # ATNF DAS (Data Aquisition System) control program gmake description file # # ON A DEBIAN SARGE MACHINE # # this appears to work, mostly #gcc -I/usr/include -I/usr/include/Xm -I/usr/X11R6/include/X11 -Iinclude -O -Wall -ansi -pedantic -g das.c -L/usr/include/Xm -L/usr/X11/lib -lXm -lXt -lX11 -lm dscomm.o generic.o -o das -- furfy # ----------------------------------------------------------------------------- # - Define macros # --------------- #SHELL = /bin/csh # library path must be in environment variable LD_LIBRARY_PATH or in ld.so.conf # eg environment var -> setenv LD_LIBRARY_PATH /usr/local/LessTif/Motif2.0/lib # note: # XINCLUDEPATH and XLIBPATH are local to our site (ATNF Epping) login system. # for LessTif version > 0.87.2 XINCLUDEPATH= /usr/include -I/usr/include/Xm -I/usr/X11R6/include/X11 -Iinclude XLIBPATH= /usr/include/Xm -L/usr/X11R6/lib # for LessTif version 0.86 #XINCLUDEPATH = /usr/local/LessTif/include -I/usr/X11/include -Iinclude #XLIBPATH = /usr/local/LessTif/lib -L/usr/X11/lib LDFLAGS = -lXm -lXt -lX11 -lm OTHER_ARG = ${LDFLAGS} LDFLAGS_afn = OTHER_ARG_afn = CC = gcc # lookinto later why -ansi doesn't work anymore, to do with signal i think #CFLAGS = -I$(XINCLUDEPATH) -O -Wall -pedantic -g CFLAGS = -I$(XINCLUDEPATH) -Wall -pedantic -g # orig CFLAGS = -I$(XINCLUDEPATH) -O -Wall -ansi -pedantic -g # -O0 disables optimisation, needed for debugging sometimes (? not sure - # this usually means other problems with gcc, as the -g option allows you to # debug properly under optimised compilation) # !debugging: # CFLAGS = -I$(XINCLUDEPATH) -O -Wall -ansi -pedantic -c #CFLAGS_fn = -Iinclude -O -Wall -ansi -pedantic -g -c CFLAGS_fn = -Iinclude -Wall -ansi -pedantic -g -c # !debugging: # CFLAGS_fn = -Iinclude -O -Wall -ansi -pedantic -c # ----------------------------------------------------------------------------- # - Targets, prerequisites and their build rules # ---------------------------------------------- das: das.c dscomm.o generic.o ${CC} ${CFLAGS} das.c \ -L${XLIBPATH} ${OTHER_ARG} \ dscomm.o generic.o -o das generic.o: generic.c ${CC} ${CFLAGS_fn} ${OTHER_ARG_afn} generic.c dscomm.o: dscomm.c ${CC} ${CFLAGS_fn} ${OTHER_ARG_afn} dscomm.c # ----------------------------------------------------------------------------- # - misc commands # --------------- clean: \rm -f dscomm.o generic.o das *~