# # Name: Makehead.sunos4 # # Purpose: This file is used to customize operating system and installation # dependent features of the MX makefiles. This version is customized # for SunOS 4.1.x # # Warning: The SunOS 4 target for MX has not been tested in quite a while # since I no longer have access to a SunOS 4 machine. However, # since SunOS 4 was replaced by Solaris a long time ago, I doubt # that anyone will care. You should expect this build target to # go away in MX 2.0. # # Normally, the only 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 = -lm #LIB_DIRS = -L$(MX_LIB_DIR) $(EPICS_LIB_DIRS) #LIBRARIES = $(EPICS_LIBRARIES) -lm # # Motor will be linked with the bundled copy of 'editline' if you use the # following definitions. # 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 -ltermcap # Comment out the following if you do not have EPICS. # # EPICS includes and libraries. # EPICS_ARCH = sun4 EPICS_TOP = /usr/local/epics EPICS_INCLUDES = -I$(EPICS_TOP)/base/include EPICS_LIB_DIRS = -L$(EPICS_TOP)/base/lib/$(EPICS_ARCH) EPICS_LIBRARIES = -lca -lCom # #======================================================================== # # Generally, you should not have to modify anything after this point. # # # Sun Sparcstation 5 with ACC (Sparc Compiler 3.0.1) under SunOS 4.1.4 # CC = acc CFLAGS = -g -KPIC $(INCLUDES) -DOS_SUNOS4 $(EXTRA_FLAGS) -DDEBUG CFLAGS_EPICS = $(CFLAGS) # Special cases for individual files. CFLAGS_MX_EPICS = $(CFLAGS_EPICS) CFLAGS_MX_VERS = $(CFLAGS) -DMX_MAJOR_VERSION=$(MX_MAJOR_VERSION) \ -DMX_MINOR_VERSION=$(MX_MINOR_VERSION) \ -DMX_UPDATE_VERSION=$(MX_UPDATE_VERSION) COMPILE = $(CC) -c DEFINE = -D MAKEDEPEND = acc -xM1 $(CFLAGS) $(READLINE_INCLUDES) \ $(EPICS_INCLUDES) *.c > Makefile.depend MAKEDEPEND_CLEAN = rm Makefile.depend # #--------------------------------------------------- # # See libMx/Makehead.irix for why this is here. # MX_LIB_OBJS = $(MX_LIB_SRCS:.c=.$(OBJ)) MOTOR_OBJS = $(MOTOR_SRCS:.c=.$(OBJ)) SERVER_OBJS = $(SERVER_SRCS:.c=.$(OBJ)) UPDATE_OBJS = $(UPDATE_SRCS:.c=.$(OBJ)) MXDRIVERINFO_OBJS = $(MXDRIVERINFO_SRCS:.c=.$(OBJ)) # #--------------------------------------------------- # RM = rm -f MAKE = make OBJ = o EXEOUT = -o DOTEXE = # #--------------------------------------------------- # 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.a MX_LIBRARY_STATIC_NAME = $(MX_LIBRARY_NAME) MX_LIBRARY_DELETE = rm $(MX_LIBRARY_NAME) $(MX_LIBRARY_NAME): $(MX_LIB_OBJS) -$(MX_LIBRARY_DELETE) ar rc libMx.a $(MX_LIB_OBJS) ranlib libMx.a 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 -m 644 mx*.h $(MX_INSTALL_DIR)/include install -m 644 $(MX_LIBRARY_NAME) $(MX_INSTALL_DIR)/lib touch $(MX_INSTALL_DIR)/etc/motor.dat touch $(MX_INSTALL_DIR)/etc/scan.dat install -m 755 ../plotgnu/plotgnu.pl $(MX_INSTALL_DIR)/bin install -m 755 ../plotgnu/showdata $(MX_INSTALL_DIR)/bin install -m 755 ../plotgnu/showplot $(MX_INSTALL_DIR)/bin install -m 755 ../plotgnu/plot2ps $(MX_INSTALL_DIR)/bin # #--------------------------------------------------- # MOTOR_NAME = motor.static $(MOTOR_NAME): $(MOTOR_OBJS) $(MX_LIBRARY_PATH) $(CC) $(CFLAGS) -o $(MOTOR_NAME) $(MOTOR_OBJS) \ $(LIB_DIRS) $(READLINE_LIB_DIRS) \ -lMx $(LIBRARIES) $(READLINE_LIBRARIES) motor_install: install -m 755 $(MOTOR_NAME) $(MX_INSTALL_DIR)/bin cp ../scripts/motor_static.script $(MX_INSTALL_DIR)/bin/motor chmod 755 $(MX_INSTALL_DIR)/bin/motor # #--------------------------------------------------- # SERVER_NAME = mxserver $(SERVER_NAME): $(SERVER_OBJS) $(MX_LIBRARY_PATH) $(CC) $(CFLAGS) -o $(SERVER_NAME) $(SERVER_OBJS) \ $(LIB_DIRS) -lMx $(LIBRARIES) server_install: install -m 755 $(SERVER_NAME) $(MX_INSTALL_DIR)/sbin install -m 755 ../scripts/startmxserver $(MX_INSTALL_DIR)/sbin install -m 755 ../scripts/mx $(MX_INSTALL_DIR)/sbin touch $(MX_INSTALL_DIR)/etc/mxserver.dat touch $(MX_INSTALL_DIR)/etc/mxserver.acl # #--------------------------------------------------- # UPDATE_NAME = mxupdate $(UPDATE_NAME): $(UPDATE_OBJS) $(MX_LIBRARY_PATH) $(CC) $(CFLAGS) -o $(UPDATE_NAME) $(UPDATE_OBJS) \ $(LIB_DIRS) -lMx $(LIBRARIES) update_install: install -m 755 $(UPDATE_NAME) $(MX_INSTALL_DIR)/sbin install -m 755 ../scripts/startmxupdate $(MX_INSTALL_DIR)/sbin touch $(MX_INSTALL_DIR)/etc/mxupdate.dat # #--------------------------------------------------- # MXDRIVERINFO_NAME = mxdriverinfo $(MXDRIVERINFO_NAME): $(MXDRIVERINFO_OBJS) $(MX_LIBRARY_PATH) $(CC) $(CFLAGS) -o $(MXDRIVERINFO_NAME) \ $(MXDRIVERINFO_OBJS) $(LIB_DIRS) -lMx $(LIBRARIES) util_install: install -m 755 $(MXDRIVERINFO_NAME) $(MX_INSTALL_DIR)/bin