# # Name: Makehead.vxworks # # Purpose: This file is used to customize operating system and installation # dependent features of the MX makefiles. This version is customized # for VxWorks. # # You must specify the following VxWorks specific variables: # # WIND_BASE - This is the directory that VxWorks was installed in. # WIND_HOST_TYPE - This is Wind River's name for the development host platform, # which should be a subdirectory of the $(WIND_BASE)/host # directory. # WIND_ARCH - This is the suffix appended to the development system # command names as specified in Table 8-3: "Suffixes for # Cross-Development Tools" in the xxx manual. # This port of MX has been tested for the '68k' and 'ppc' # architectures. # WIND_CPU - This is the CPU type taken from the list in the Wind River # include file $(WIND_BASE)/target/h/types/vxCpu.h. # # # Host: Solaris 8, Target: MVME162 # #WIND_BASE = /export/home/tornado/tornado2 #WIND_HOST_TYPE = sun4-solaris2 #WIND_ARCH = 68k #WIND_CPU = MC68040 #INSTALL = /usr/ucb/install # # Host: Linux, Target: MVME162 # WIND_BASE = /opt/tornado/tornado2 WIND_HOST_TYPE = x86-linux WIND_ARCH = 68k WIND_CPU = MC68040 INSTALL = /usr/bin/install # # Normally, the only other things that end users may have to modify in this # file are the definitions of INCLUDES, LIB_DIRS, and LIBRARIES. # # INCLUDES = $(MX_INCLUDES) LIB_DIRS = -L$(MX_LIB_DIR) LIBRARIES = # # VxWorks often runs on resource constrained systems, so we define here # a list of MX drivers that only includes the actual drivers we need. # # Note that you must also edit libMx/mx_driver_vxworks.c to match. # MX_DRIVER_VXWORKS_SRCS = i_vxworks_rs232.c i_vxworks_vme.c \ i_pdi40.c i_pdi45.c i_vme58.c i_vsc16.c i_iseries.c \ d_soft_ainput.c d_soft_aoutput.c d_soft_dinput.c d_soft_doutput.c \ d_pdi45_aio.c d_pdi45_dio.c d_iseries_aio.c d_iseries_dio.c \ d_bit.c d_vme_dio.c \ d_soft_motor.c d_pdi40.c d_stp100.c d_vme58.c d_elapsed_time.c \ d_soft_scaler.c d_vsc16_scaler.c d_vsc16_timer.c \ d_pdi45_scaler.c d_pdi45_timer.c d_soft_timer.c d_interval_timer.c \ d_soft_amplifier.c d_generic_relay.c d_blind_relay.c \ d_pdi45_pulser.c v_mathop.c # # Motor will be linked with the bundled copy of 'editline' if you use the # following definitions. # #READLINE_LIB_DIRS = #READLINE_LIBRARIES = ../tools/unix/src/editline/libedit.a #READLINE_LIB_DIRS = -L../tools/unix/src/editline #READLINE_LIBRARIES = -ledit # # If you prefer to link motor to GNU Readline instead, uncomment the # following definitions. # #READLINE_LIB_DIRS = -L/usr/local/lib #READLINE_LIBRARIES = -lreadline -lcurses # #======================================================================== # # Generally, you should not have to modify anything after this point. # export GCC_EXEC_PREFIX = $(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ # # gcc specific flags # GCCFLAGS = -Wall -Werror \ -Wpointer-arith \ -Wcast-align \ -Wcast-qual \ -Wmissing-prototypes \ -Wnested-externs \ -Winline # # VxWorks with GCC version 2.72.2. # CC = $(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/cc$(WIND_ARCH) LD = $(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/ld$(WIND_ARCH) CFLAGS = -g $(GCCFLAGS) $(INCLUDES) -fno-builtin -nostdinc \ -DOS_VXWORKS -DCPU=$(WIND_CPU) \ -I$(WIND_BASE)/target/h $(EXTRA_FLAGS) -DDEBUG CFLAGS_EPICS = $(CFLAGS) -Wno-strict-prototypes -Wno-shadow # Special cases for individual files. CFLAGS_MX_EPICS = $(CFLAGS_EPICS) -Wno-cast-qual CFLAGS_MX_VERS = $(CFLAGS) -DMX_MAJOR_VERSION=$(MX_MAJOR_VERSION) \ -DMX_MINOR_VERSION=$(MX_MINOR_VERSION) \ -DMX_UPDATE_VERSION=$(MX_UPDATE_VERSION) CFLAGS_MAKEDEPEND = $(CFLAGS) $(READLINE_INCLUDES) COMPILE = $(CC) -c DEFINE = -D MAKEDEPEND = $(CC) -MM $(CFLAGS_MAKEDEPEND) *.c > Makefile.depend MAKEDEPEND_CLEAN = rm Makefile.depend # #--------------------------------------------------- # MX_LIB_SRCS = mx_driver_vxworks.c $(MX_CORE_SRCS) $(MX_DRIVER_VXWORKS_SRCS) # # See libMx/Makehead.irix for why this is here. # MX_LIB_OBJS = $(MX_LIB_SRCS:.c=.o) MOTOR_OBJS = $(MOTOR_SRCS:.c=.o) SERVER_OBJS = $(SERVER_SRCS:.c=.o) UPDATE_OBJS = $(UPDATE_SRCS:.c=.o) MXDRIVERINFO_OBJS = $(MXDRIVERINFO_SRCS:.c=.o) #---- MX_LIB_OBJS += ../tools/strlcpy.o ../tools/strlcat.o # #--------------------------------------------------- # RM = rm -f MAKE = make OBJ = o EXEOUT = -o DOTEXE = .o # #--------------------------------------------------- # MX_LIB_DIR = ../libMx MX_INC_DIR = $(MX_LIB_DIR) MX_INCLUDES = -I$(MX_INC_DIR) MX_LIBRARY_PATH = $(MX_LIB_DIR)/$(MX_LIBRARY_NAME) MX_LIBRARY_NAME = libMx.o MX_LIBRARY_STATIC_NAME = $(MX_LIBRARY_NAME) MX_LIBRARY_DELETE = rm $(MX_LIBRARY_NAME) $(MX_LIBRARY_NAME): $(MX_LIB_OBJS) -$(MX_LIBRARY_DELETE) $(LD) -o $(MX_LIBRARY_NAME) \ -r $(LIB_DIRS) $(MX_LIB_OBJS) $(LIBRARIES) library_install: -mkdir $(MX_INSTALL_DIR)/bin -mkdir $(MX_INSTALL_DIR)/etc -mkdir $(MX_INSTALL_DIR)/etc/startup -mkdir $(MX_INSTALL_DIR)/include -mkdir $(MX_INSTALL_DIR)/lib -mkdir $(MX_INSTALL_DIR)/log -mkdir $(MX_INSTALL_DIR)/run -mkdir $(MX_INSTALL_DIR)/sbin -mkdir $(MX_INSTALL_DIR)/state $(INSTALL) -c -m 644 mx*.h $(MX_INSTALL_DIR)/include $(INSTALL) -c -m 644 $(MX_LIBRARY_NAME) $(MX_INSTALL_DIR)/lib touch $(MX_INSTALL_DIR)/etc/motor.dat touch $(MX_INSTALL_DIR)/etc/scan.dat # #--------------------------------------------------- # MOTOR_NAME = motor_shell.o $(MOTOR_NAME): mvxworks.o $(MOTOR_OBJS) $(MX_LIBRARY_PATH) $(LD) -o $(MOTOR_NAME) -r mvxworks.o $(MOTOR_OBJS) mvxworks.o: mvxworks.c $(COMPILE) $(CFLAGS) mvxworks.c motor_install: $(INSTALL) -c -m 755 $(MOTOR_NAME) $(MX_INSTALL_DIR)/bin # #--------------------------------------------------- # SERVER_NAME = mxserver.o $(SERVER_NAME): ms_vxworks.o $(SERVER_OBJS) $(MX_LIBRARY_PATH) $(LD) -o $(SERVER_NAME) -r ms_vxworks.o $(SERVER_OBJS) ms_vxworks.o: ms_vxworks.c $(COMPILE) $(CFLAGS) ms_vxworks.c server_install: $(INSTALL) -c -m 755 $(SERVER_NAME) $(MX_INSTALL_DIR)/sbin touch $(MX_INSTALL_DIR)/etc/mxserver.dat touch $(MX_INSTALL_DIR)/etc/mxserver.acl # #--------------------------------------------------- # UPDATE_NAME = mxupdate.o $(UPDATE_NAME): $(UPDATE_OBJS) $(MX_LIBRARY_PATH) $(LD) -o $(UPDATE_NAME) -r $(UPDATE_OBJS) update_install: $(INSTALL) -c -m 755 $(UPDATE_NAME) $(MX_INSTALL_DIR)/sbin touch $(MX_INSTALL_DIR)/etc/mxupdate.dat # #--------------------------------------------------- # MXDRIVERINFO_NAME = mxdriverinfo_cmd.o $(MXDRIVERINFO_NAME): $(MXDRIVERINFO_OBJS) $(MX_LIBRARY_PATH) $(LD) -o $(MXDRIVERINFO_NAME) -r $(MXDRIVERINFO_OBJS) util_install: $(INSTALL) -c -m 755 $(MXDRIVERINFO_NAME) $(MX_INSTALL_DIR)/bin