# This makefile has been tuned to compile the VS4 VME motor controller # driver and corresponding client programs for the Hall-D FDC laser # scaning system. # # July 7,2008 D. Lawrence # OS = $(shell uname) ifeq ($(OS), Darwin) CC = ppc-vxworks-gcc CXX = ppc-vxworks-g++ LD = ppc-vxworks-ld INCS = -I/usr/local/vxworks/lib/gcc/ppc-vxworks/3.4.1/include else WIND_BASE = /usr/local/vxworks/5.4/ppc WIND_HOST_TYPE = x86-linux CC = $(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/ccppc CXX = $(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/c++ppc LD = $(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/ldppc INCS = -I$(WIND_BASE)/host/$(WIND_HOST_TYPE)include/g++-3/ INCS += -I$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/powerpc-wrs-vxworks/gcc-2.96/include/ endif # This path is used to make sure both gcc and as (binutils) # are used from the cross-compiler rather than from the native one path = .:$(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin:$(CODA_BIN):/usr/local/vxworks/bin:/usr/bin:/bin SHELL = /bin/bash DEFINES = -DVXWORKS -DVXWORKSPPC -DCPU=PPC604 -D_GNU_TOOL INCS += -I$(WIND_BASE)/target/h CFLAGS = -O -mcpu=604 -nostdinc -fno-writable-strings -mlongcall\ -mstrict-align -ansi $(DEFINES) OBJS = vs4.o fdc_laser_micah.o #MeasureFlatness.o all: $(OBJS) @echo " " @echo "Done making $(OBJS)." @echo " " # cp fdc_laser_micah.* vs4.* /Volumes/"NO NAME" vs4.o: vs4.c vs4.h @echo compiling vs4.c ... export PATH=$(path) ; $(CC) -c $(CFLAGS) vs4.c $(INCS) -o vs4.o @echo made vs4.o @echo " " fdc_laser_micah.o: fdc_laser_micah.cc vs4.h @echo compiling fdc_laser_micah.cc ... export PATH=$(path) ; $(CXX) -c $(CFLAGS) fdc_laser_micah.cc $(INCS) -o fdc_laser_micah.o @echo made fdc_laser_micah.o @echo " " install: fdc_laser_micah.o vs4.o ifeq ($(OS), Darwin) cp fdc_laser_micah.* vs4.* /Volumes/"NO NAME" else cp fdc_laser_micah.o vs4.o ~/2306 @echo @echo "Deployed fdc_laser_micah.o and vs4.o to ~/2306 directory" @echo endif clean: rm -f $(OBJS) *~ env: @echo OS=$(OS)