Pull in Makefile changes from RELEASE-3_2
This commit is contained in:
16
site_ansto/Makefile
Normal file → Executable file
16
site_ansto/Makefile
Normal file → Executable file
@ -7,6 +7,8 @@
|
|||||||
# Markus Zolliker, March 2003
|
# Markus Zolliker, March 2003
|
||||||
#==========================================================================
|
#==========================================================================
|
||||||
|
|
||||||
|
.PHONY: sct
|
||||||
|
|
||||||
default: all
|
default: all
|
||||||
|
|
||||||
# ANSTO rules and variables
|
# ANSTO rules and variables
|
||||||
@ -16,7 +18,7 @@ PSI_LIBS = \
|
|||||||
-ldl -lz -lm -lc $(LIB_MXML) $(LIB_JSON)
|
-ldl -lz -lm -lc $(LIB_MXML) $(LIB_JSON)
|
||||||
CC = gcc
|
CC = gcc
|
||||||
INCFLAGS = -Ihardsup -I.. $(INC_HDF5) $(INC_TCL8)
|
INCFLAGS = -Ihardsup -I.. $(INC_HDF5) $(INC_TCL8)
|
||||||
# NOTE -std=gnu99 adds c99 support with gnu extensions, it eliminates implicit function warnings
|
# NOTE -std=gnu99 adds c99 support with gnu extensions, it eliminates implicit function warnings
|
||||||
# for c99 functions like roundf. We don't use -std=c99 because it generates compiler errors in
|
# for c99 functions like roundf. We don't use -std=c99 because it generates compiler errors in
|
||||||
# code modules that use the timeval struct without including sys/time.h, c99 also generates
|
# code modules that use the timeval struct without including sys/time.h, c99 also generates
|
||||||
# implicit function declaration warnings on string functions like strdup.
|
# implicit function declaration warnings on string functions like strdup.
|
||||||
@ -25,7 +27,9 @@ INCFLAGS = -Ihardsup -I.. $(INC_HDF5) $(INC_TCL8)
|
|||||||
# may be in different locations. This code tries to find the include files and
|
# may be in different locations. This code tries to find the include files and
|
||||||
# libraries required in descending order of preference.
|
# libraries required in descending order of preference.
|
||||||
|
|
||||||
libsearch = $(wildcard /usr/lib*/lib$(1).so /usr/lib*/lib$(1).so.? /usr/lib*/lib$(1).so.??* /usr/lib*/lib$(1).a)
|
libsearcha = $(wildcard /usr/lib*/lib$(1).a)
|
||||||
|
libsearchso = $(wildcard /usr/lib*/lib$(1).so /usr/lib*/lib$(1).so.? /usr/lib*/lib$(1).so.??*)
|
||||||
|
libsearch = $(firstword $(call libsearcha,$(1)) $(call libsearchso,$(1)))
|
||||||
libsearch1 = $(firstword $(call libsearch,$(1)))
|
libsearch1 = $(firstword $(call libsearch,$(1)))
|
||||||
incsearch = $(wildcard /usr/include/$(1) /usr/local/include/$(1))
|
incsearch = $(wildcard /usr/include/$(1) /usr/local/include/$(1))
|
||||||
incsearch1 = $(firstword $(call incsearch,$(1)))
|
incsearch1 = $(firstword $(call incsearch,$(1)))
|
||||||
@ -41,7 +45,7 @@ $(foreach myinc,$(myincs),$(info incsearch1($(myinc)) = $(call incsearch1,$(myin
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# TCL 8.5 or 8.4
|
# TCL 8.5 or 8.4
|
||||||
LIB_TCL8 = $(firstword $(call libsearch1,tcl8.5) $(call libsearch1,tcl8.4))
|
LIB_TCL8 = $(firstword $(call libsearchso,tcl8.5) $(call libsearchso,tcl8.4))
|
||||||
INC_TCL8 = $(firstword $(call incsearch1,tcl.h) $(call incsearch1,tcl8.5/tcl.h) $(call incsearch1,tcl8.4/tcl.h))
|
INC_TCL8 = $(firstword $(call incsearch1,tcl.h) $(call incsearch1,tcl8.5/tcl.h) $(call incsearch1,tcl8.4/tcl.h))
|
||||||
|
|
||||||
ifeq (,$(LIB_TCL8))
|
ifeq (,$(LIB_TCL8))
|
||||||
@ -123,7 +127,7 @@ SITEHARDSUP = hardsup/libhlib.a
|
|||||||
HARDSUPDIR = $(SITEDIR)/hardsup
|
HARDSUPDIR = $(SITEDIR)/hardsup
|
||||||
SUBLIBS = libansto.a hardsup/libhlib.a $(PSI_SLIBS) libansto.a hardsup/libhlib.a $(PSI_LIBS)
|
SUBLIBS = libansto.a hardsup/libhlib.a $(PSI_SLIBS) libansto.a hardsup/libhlib.a $(PSI_LIBS)
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .c .o .f
|
.SUFFIXES: .c .o .f
|
||||||
|
|
||||||
GHTTP_LIBS = $(LIB_HTTP)
|
GHTTP_LIBS = $(LIB_HTTP)
|
||||||
@ -154,7 +158,9 @@ OBJ= site_ansto.o anstoutil.o\
|
|||||||
beamstopaction.o action.o \
|
beamstopaction.o action.o \
|
||||||
tclClock.o tclDate.o tclUnixTime.o
|
tclClock.o tclDate.o tclUnixTime.o
|
||||||
|
|
||||||
all: config libsics libansto.a libhardsup
|
all: | config libsics libhardsup SICServer
|
||||||
|
|
||||||
|
SICServer: ../SICSmain.o libansto.a hardsup/libhlib.a ../libsics.a ../matrix/libmatrix.a | config libsics libhardsup
|
||||||
$(CC) -g -o SICServer ../SICSmain.o $(SUBLIBS) $(GHTTP_LIBS)
|
$(CC) -g -o SICServer ../SICSmain.o $(SUBLIBS) $(GHTTP_LIBS)
|
||||||
|
|
||||||
config:
|
config:
|
||||||
|
Reference in New Issue
Block a user