Break Makefile to make Makefile_SICS for the sics directory
This commit is contained in:
@@ -7,31 +7,13 @@
|
||||
# Markus Zolliker, March 2003
|
||||
#==========================================================================
|
||||
|
||||
include ../linux_def
|
||||
# TODO Should use PSI ../make_gen instead of make_gen_variables
|
||||
include make_gen_variables
|
||||
default: all
|
||||
|
||||
# PSI rules and variables
|
||||
EXTRA=nintf.o
|
||||
PSI_CLEAN_MATRIX = rm -f ../*.o ../*.d ../psi/*.o ../psi/*.d; $(MAKE) -C ../matrix $(MFLAGS) clean
|
||||
PSI_CFLAGS = -I./ $(INC_HDF5) $(INC_TCL8) -DDO_NOT_SELECT_BEFORE_SEND -DHDF5 -DNXXML\
|
||||
-DCYGNUS -DNONINTF -std=gnu99 -g $(DFORTIFY)\
|
||||
-Wall -Wextra -Wno-unused
|
||||
PSI_SLIBS = matrix/libmatrix.a
|
||||
# ANSTO rules and variables
|
||||
PSI_SLIBS = ../libsics.a ../matrix/libmatrix.a
|
||||
PSI_LIBS = \
|
||||
$(LIB_TCL8) $(LIB_HDF5) -lpthread \
|
||||
-ldl -lz -lm -lc $(LIB_MXML) $(LIB_JSON)
|
||||
PSI_CFLAGS += -MMD
|
||||
PSI_CFLAGS += -DSITE_ANSTO
|
||||
|
||||
../%.o : ../%.c
|
||||
cd ..; $(CC) -c $(PSI_CFLAGS) $*.c -o $*.o
|
||||
|
||||
../matrix/libmatrix.a:
|
||||
make -C ../matrix $(MFLAGS) libmatrix.a
|
||||
|
||||
# ANSTO rules and variables
|
||||
CC = gcc
|
||||
INCFLAGS = -Ihardsup -I.. $(INC_HDF5) $(INC_TCL8)
|
||||
# NOTE -std=gnu99 adds c99 support with gnu extensions, it eliminates implicit function warnings
|
||||
@@ -111,30 +93,16 @@ CFLAGS += $(INCFLAGS)
|
||||
CFLAGS += $(DEBUGFLAGS)
|
||||
CFLAGS += -MMD
|
||||
|
||||
SRC = ./../..
|
||||
SITENAME = _ansto
|
||||
SITEDIR = site_ansto
|
||||
SITELIB = libansto.a
|
||||
SITEHARDSUP = hardsup/libhlib.a
|
||||
HARDSUPDIR = $(SITEDIR)/hardsup
|
||||
SUBLIBS = libansto.a hardsup/libhlib.a
|
||||
VPATH = $(SRC)
|
||||
TANGOROOT = /usr/local/lib/
|
||||
OMNIORBROOT = /usr/local/lib
|
||||
COREDIR = $(SRC)
|
||||
SUBLIBS = libansto.a hardsup/libhlib.a $(PSI_SLIBS) libansto.a hardsup/libhlib.a $(PSI_LIBS)
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .f
|
||||
|
||||
TANGOLIBS = \
|
||||
/usr/local/lib/libclient.a \
|
||||
/usr/local/lib/liblog4tango.a \
|
||||
/usr/local/lib/libtango.a \
|
||||
/usr/local/lib/libomniDynamic4.a \
|
||||
/usr/local/lib/libomniORB4.a \
|
||||
/usr/local/lib/libomnithread.a
|
||||
|
||||
|
||||
GHTTP_LIBS = $(LIB_HTTP)
|
||||
|
||||
#OBJ= site_ansto.o batch.o buffer.o ruli.o protocol.o sinfox.o \
|
||||
@@ -163,14 +131,14 @@ OBJ= site_ansto.o anstoutil.o\
|
||||
beamstopaction.o action.o \
|
||||
tclClock.o tclDate.o tclUnixTime.o
|
||||
|
||||
all: config ../matrix/libmatrix.a $(COREOBJ:%=../%) $(EXTRA:%=../%) libansto.a libhardsup
|
||||
$(CC) -g -o SICServer $(COREOBJ:%=../%) $(EXTRA:%=../%) $(SUBLIBS) $(PSI_SLIBS:%=../%) $(PSI_LIBS) $(GHTTP_LIBS)
|
||||
all: config libsics libansto.a libhardsup
|
||||
$(CC) -g -o SICServer ../SICSmain.o $(SUBLIBS) $(GHTTP_LIBS)
|
||||
|
||||
config:
|
||||
@bash make_config.sh
|
||||
|
||||
xref: all
|
||||
python xref.py $(COREOBJ:%=../%) $(EXTRA:%=../%) $(SUBLIBS) $(PSI_SLIBS:%=../%) $(PSI_LIBS) $(GHTTP_LIBS)
|
||||
python xref.py $(SUBLIBS) $(GHTTP_LIBS)
|
||||
|
||||
#TODO Add targets for other instruments
|
||||
echidna: all
|
||||
@@ -204,6 +172,9 @@ libansto.a: $(OBJ)
|
||||
libhardsup:
|
||||
$(MAKE) -C hardsup/ INC_TCL8="$(INC_TCL8)"
|
||||
|
||||
libsics:
|
||||
$(MAKE) -C .. -f site_ansto/Makefile_SICS INC_TCL8="$(INC_TCL8)" INC_HDF5="$(INC_HDF5)" all
|
||||
|
||||
anstohm.o : anstohm.cpp
|
||||
$(CXX) -c anstohm.cpp $(CFLAGS) $(CXXFLAGS) -Wno-all
|
||||
|
||||
@@ -215,13 +186,12 @@ hm_asim.o : hm_asim.cpp
|
||||
|
||||
anstoclean:
|
||||
$(MAKE) -C hardsup clean
|
||||
rm -f SICServer
|
||||
rm -f *.a
|
||||
rm -f *.o
|
||||
rm -f *.d
|
||||
rm -f SICServer *.a *.o *.d
|
||||
|
||||
clean: anstoclean
|
||||
$(PSI_CLEAN_MATRIX)
|
||||
sicsclean:
|
||||
$(MAKE) -C .. -f site_ansto/Makefile_SICS clean
|
||||
|
||||
clean: anstoclean sicsclean
|
||||
|
||||
MZOBJ=fsm.o logger.o sugar.o pardef.o ease.o strobj.o oxinst.o \
|
||||
ipsdriv.o ilmdriv.o itcdriv.o ighdriv.o euro2kdriv.o modbus.o
|
||||
|
||||
48
site_ansto/Makefile_SICS
Normal file
48
site_ansto/Makefile_SICS
Normal file
@@ -0,0 +1,48 @@
|
||||
# vim: ft=make ts=4 sw=4 noet cindent
|
||||
#---------------------------------------------------------------------------
|
||||
# Makefile for SICS
|
||||
# machine-dependent part for Redhat Linux with AFS at PSI
|
||||
#
|
||||
# Mark Koennecke 1996-2001
|
||||
# Markus Zolliker, March 2003
|
||||
#==========================================================================
|
||||
|
||||
include linux_def
|
||||
# TODO Should use PSI make_gen instead of make_gen_variables
|
||||
include site_ansto/make_gen_variables
|
||||
default: all
|
||||
|
||||
# PSI rules and variables
|
||||
COREOBJ += nintf.o
|
||||
PSI_CFLAGS = -I./ $(INC_HDF5) $(INC_TCL8) -DDO_NOT_SELECT_BEFORE_SEND -DHDF5 -DNXXML\
|
||||
-DCYGNUS -DNONINTF -std=gnu99 -g $(DFORTIFY)\
|
||||
-Wall -Wextra -Wno-unused
|
||||
PSI_SLIBS = matrix/libmatrix.a
|
||||
PSI_LIBS = \
|
||||
$(LIB_TCL8) $(LIB_HDF5) -lpthread \
|
||||
-ldl -lz -lm -lc $(LIB_MXML) $(LIB_JSON)
|
||||
PSI_CFLAGS += -MMD
|
||||
PSI_CFLAGS += -DSITE_ANSTO
|
||||
|
||||
all: libsics.a libmatrix
|
||||
|
||||
libsics.a: $(COREOBJ)
|
||||
rm -f libsics.a
|
||||
ar cr libsics.a $(COREOBJ)
|
||||
ranlib libsics.a
|
||||
|
||||
libmatrix:
|
||||
$(MAKE) -C matrix $(MFLAGS) libmatrix.a
|
||||
|
||||
clean:
|
||||
rm -f *.o *.d psi/*.o psi/*.d
|
||||
$(MAKE) -C matrix $(MFLAGS) clean
|
||||
|
||||
%.c: %.w
|
||||
|
||||
%.o : %.c
|
||||
$(CC) -c $(PSI_CFLAGS) $*.c -o $*.o
|
||||
|
||||
# Use the dependency files we requested gcc to produce for us
|
||||
DEPS := $(COREOBJ:.o=.d)
|
||||
-include $(DEPS)
|
||||
Reference in New Issue
Block a user