EPICS = ../../../..
include Target.include
include $(EPICS)/config/CONFIG_BASE

USR_CFLAGS = -D_NO_PROTO

SRCS.c = \
	../arAccessLib.c ../arCSCheck.c ../arChanIO.c ../bfSubr.c \
	../bucketLib.c ../calcPerform.c ../cmdSubr.c ../cvtFast.c \
	../cvtNumbers.c ../ellLib.c ../envSubr.c ../errMtst.c ../errSymLib.c \
	../ezsSockSubr.c ../fdmgr.c ../freeListLib.c ../genSubr.c \
	../genTaskSubr.c ../gpHashLib.c ../helpSubr.c ../memDebugLib.c \
	../nextFieldSubr.c ../postfix.c ../sydSubr.c ../sydSubrCA.c \
	../sydSubrCF.c ../sydSubrSSF.c ../tsSubr.c errSymTbl.c ../errInc.c \
	../realpath.c

LIBOBJS = \
	tsSubr.o arAccessLib.o arCSCheck.o arChanIO.o bfSubr.o bucketLib.o \
        calcPerform.o cmdSubr.o cvtFast.o cvtNumbers.o ellLib.o \
        envSubr.o errMtst.o errSymLib.o errSymTbl.o ezsSockSubr.o fdmgr.o \
        freeListLib.o genSubr.o genTaskSubr.o gpHashLib.o helpSubr.o \
        memDebugLib.o nextFieldSubr.o postfix.o sydSubr.o sydSubrCA.o \
        sydSubrCF.o sydSubrSSF.o realpath.o

LIBNAME = libCom.a

#TARGETS = cvtTest tsTest sydTest

include $(EPICS)/config/RULES.Unix

errSymTbl.o: errSymTbl.c errInc.o
	$(COMPILE.c) -o $@ $<

errSymTbl.c errInc.o: errInc.c
	@$(RM) errInc.o
	@$(EPICS_BASE)/tools/blderrSymTbl;

pre_build:
	@test -f errInc.c || ln -s ../errInc.c errInc.c

cvtTest: cvtNumbers.o
	$(LINK.c) -o $@ cvtNumbers.o -lCom -lDb -lCom -lm -s

tsTest: tsSubr.o
	$(LINK.c) -o $@ tsSubr.o -lCom -lDb -lCom -lm -s

sydTest: sydSubr.o
	$(LINK.c) -o $@ sydSubr.o -lCom -lca -lDb -lCom -lm -s

clean::
	@$(RM) errInc.c errSymTbl.c

