# # File: # Makefile # # Description: # Makefile for the coda primary and secondary readout lists # running on an Intel-based controller running Linux # # # $Date$ # $Rev$ # # Uncomment DEBUG line for debugging info ( -g and -Wall ) DEBUG=1 # SCALERLIBS = /home/adev/linuxvme/scaler/sis3801 SCAL_LIB = ${SCALERLIBS}/SIS3800.so VETROCLIBS = /home/adev/linuxvme/vetroc VETROC_LIB = ${VETROCLIBS}/libvetroc.so GTPLIBS = /home/adev/linuxvme/vetroc GTP_LIB = ${VETROCLIBS}/libgtp.so # Plug in your primary readout lists here.. VMEROL = vme_vetroc1.so vme_block1.so vme_donothing.so vme_crate01.so vme_crate02.so vme_dual.so # Add shared library dependencies here. (jvme, ti, are already included) ROLLIBS = ROLLIBS = -lfadc -lsimple -lc792 ifndef LINUXVME_LIB LINUXVME_LIB = $CODA/extensions/linuxvme/libs endif ifndef LINUXVME_INC LINUXVME_INC = $CODA/extensions/linuxvme/include endif # DEFs for compiling primary readout lists CC = gcc AR = ar RANLIB = ranlib ifdef DEBUG CFLAGS = -Wall -g else CFLAGS = -O3 endif CFLAGS += -w -I. -I${LINUXVME_INC} -I/usr/include -I${CODA}/common/include\ -L. -L${LINUXVME_LIB} -DJLAB CFLAGS += -I${SCALERLIBS} -I${VETROCLIBS} -I${GTPLIBS} CFLAGS += -lrt -lpthread -ljvme -lti $(ROLLIBS) CFLAGS += ${SCAL_LIB} $(VETROC_LIB) $(GTP_LIB) CFLAGS += -DLINUX -DDAYTIME=\""`date`"\" # 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 -lti CODA_DEFS = -DLINUX -DDAYTIME=\""`date`"\" CODA_CFLAGS = -O -w -fpic -shared ${CODA_INCS} ${CODA_LIBDIRS} \ ${CODA_LIBS} ${CODA_DEFS} ${SCAL_LIB} ${VETROC_LIB} \ ${GTP_LIB} ifdef DEBUG CODA_CFLAGS += -Wall -g endif CRLFILES = $(wildcard *.crl) CFILES = $(CRLFILES:.crl=.c) SOBJS = $(CRLFILES:.crl=.so) all: $(VMEROL) $(SOBJS) %.so: %.c Makefile tiprimary_list.c @echo @echo "Building $@ from $<" @echo $(CC) -fpic -shared $(CFLAGS) -DINIT_NAME=$(@:.so=__init) -o $@ $< clean distclean: @rm -f $(VMEROL) $(VMEROL2) $(SOBJS) $(CFILES) *~ .PHONY: all