# # File: # Makefile # export DEBUG=1 # # Plug in your primary readout lists here.. VETROCLIB = libvetroc.so GTPLIB = libgtp.so LINUXVME_LIB ?= ../lib LINUXVME_INC ?= ../include # libs for the client LIBS = ${VETROCLIB} ${LINUXVME_LIB}/libjvme.so # DEFs for compiling primary readout lists CC = gcc AR = ar RANLIB = ranlib CFLAGS = -O3 -w -I${LINUXVME_INC} -I. -I/usr/include -I${CODA}/common/include\ -L${LINUXVME_LIB} -L. -DJLAB CFLAGS += -ljvme -ltir -lti $(ROLLIBS) CFLAGS += -DLINUX -DDAYTIME=\""`date`"\" ifdef DEBUG CFLAGS += -Wall -g endif # DEFs for compiling CODA readout lists CCRL = ${CODA_BIN}/ccrl CODA_INCS = -I. -I${LINUXVME_INC} -I${CODA}/common/include CODA_LIBDIRS = -L. -L${LINUXVME_LIB} CODA_LIBS = -ljvme -ltir -lti CODA_DEFS = -DLINUX -DDAYTIME=\""`date`"\" CODA_CFLAGS = -O -w -fpic -shared ${CODA_INCS} ${CODA_LIBDIRS} \ ${CODA_LIBS} ${CODA_DEFS} ifdef DEBUG CODA_CFLAGS += -Wall -g endif all: $(VETROCLIB) $(GTPLIB) tstvet1 tstvet2 tstvet3 tstvet5 vetrocfirmware libgtp.so: gtpLib.c gtpSocket.c gtpVMELib.c @echo @echo "Building $@ from $<" @echo $(CC) -fpic -shared $(CFLAGS) -D_GNU_SOURCE -DINIT_NAME=$(@:.so=__init) -o $@ gtpLib.c gtpSocket.c gtpVMELib.c libvetroc.so: vetrocLib.c @echo @echo "Building $@ from $<" @echo $(CC) -fpic -shared $(CFLAGS) -D_GNU_SOURCE -DINIT_NAME=$(@:.so=__init) -o $@ $< tstvet1: vetroc_test1.o $(CC) $(CFLAGS) -o $@ vetroc_test1.c $(LIBS) tstvet2: vetroc_test2.o $(CC) $(CFLAGS) -o $@ vetroc_test2.c $(LIBS) tstvet3: vetroc_test3.o $(CC) $(CFLAGS) -o $@ vetroc_test3.c $(LIBS) tstvet5: vetroc_test5.o $(CC) $(CFLAGS) -o $@ vetroc_test5.c $(LIBS) bryan_test: vetroc_bryan.o $(CC) $(CFLAGS) -o $@ $< $(LIBS) vetrocfirmware: vetroc_firmware.o $(CC) $(CFLAGS) -o $@ vetroc_firmware.c $(LIBS) clean distclean: @rm -f $(VETROCLIB) *.o *~ .PHONY: all