#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
#     National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
#     Operator of Los Alamos National Laboratory.
# EPICS BASE Versions 3.13.7
# and higher are distributed subject to a Software License Agreement found
# in file LICENSE that is included with this distribution. 
#*************************************************************************
TOP = ../../..
include $(TOP)/config/CONFIG_BASE

USR_INCLUDES = -I$(TOP)/src/include/os/vxWorks

VPATH = ../os/vxWorks

SRCS.c += ../cvtFast.c
SRCS.c += ../gpHashLib.c
SRCS.c += ../freeListLib.c
SRCS.c += ../ellLib.c
SRCS.c += ../envSubr.c
SRCS.c += envData.c
SRCS.c += ../errSymLib.c
SRCS.c += ../postfix.c 
SRCS.c += ../calcPerform.c
SRCS.c += ../sCalcPostfix.c 
SRCS.c += ../sCalcPerform.c
SRCS.c += ../bucketLib.c
SRCS.c += ../memDebugLib.c
SRCS.c += ../tsSubr.c
SRCS.c += ../pal.c 
SRCS.c += ../paldef.c
SRCS.c += errSymTbl.c
SRCS.c += ../errlogVX.c
SRCS.c += ../assertVX.c
SRCS.c += ../macCore.c
SRCS.c += ../macUtil.c
#SRCS.c += ../osiTimer.cc
#SRCS.c += ../os/vxWorks/osdTime.cc
SRCS.c += ../os/vxWorks/sigPipeIgnore.c
SRCS.c += ../dbmf.c
SRCS.c += ../epicsString.c
SRCS.c += ../aToIPAddr.c
SRCS.c += ../adjustment.c
SRCS.c += ../os/vxWorks/bsdSockResource.c
SRCS.c += ../os/vxWorks/osiSleep.c
SRCS.c += ../logMsgToErrlog.c

LIBOBJS += cvtFast.o
LIBOBJS += ellLib.o
LIBOBJS += envData.o
LIBOBJS += envSubr.o
LIBOBJS += errSymLib.o
LIBOBJS += errSymTbl.o
LIBOBJS += postfix.o
LIBOBJS += calcPerform.o
LIBOBJS += sCalcPostfix.o
LIBOBJS += sCalcPerform.o
LIBOBJS += bucketLib.o
LIBOBJS += tsSubr.o
LIBOBJS += gpHashLib.o
LIBOBJS += freeListLib.o
LIBOBJS += pal.o
LIBOBJS += paldef.o
LIBOBJS += errlogVX.o
LIBOBJS += assertVX.o
LIBOBJS += macCore.o
LIBOBJS += macUtil.o
#LIBOBJS += osiTimer.o
#LIBOBJS += osdTime.o
LIBOBJS += sigPipeIgnore.o
LIBOBJS += dbmf.o
LIBOBJS += epicsString.o
LIBOBJS += aToIPAddr.o
LIBOBJS += adjustment.o
LIBOBJS += bsdSockResource.o
LIBOBJS += osiSleep.o
LIBOBJS += logMsgToErrlog.o

LIBNAME = libCom

MAN3 = gpHash.3 freeList.3

ERR_S_FILES += $(TOP)/src/include/asLib.h
ERR_S_FILES += $(TOP)/src/db/dbAccess.h
ERR_S_FILES += $(TOP)/src/db/devLib.h
ERR_S_FILES += $(TOP)/src/include/devSup.h
ERR_S_FILES += $(TOP)/src/include/drvSup.h
ERR_S_FILES += $(TOP)/src/db/recSup.h
ERR_S_FILES += $(TOP)/src/dbStatic/dbStaticLib.h
ERR_S_FILES += $(TOP)/src/drv/ansi/drvEpvxi.h
ERR_S_FILES += $(TOP)/src/drv/old/drvBitBusErr.h
ERR_S_FILES += $(TOP)/src/drv/old/drvGpibErr.h
ERR_S_FILES += ../tsDefs.h
ERR_S_FILES += ../errMdef.h
ERR_S_FILES += $(TOP)/src/cas/generic/casdef.h
ERR_S_FILES += $(TOP)/src/gdd/gddAppFuncTable.h

include $(TOP)/config/RULES.Vx

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

# The (otherwise correct) $(TOP)... dependencies are handled wrong by GNUmake,
# it rebuilds envData.c in any case:
#envData.c: ../envDefs.h $(TOP)/config/CONFIG_ENV $(TOP)/config/CONFIG_SITE_ENV
envData.c: ../envDefs.h
	$(PERL) ../bldEnvData.pl $(TOP)/config

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

errSymTbl.c: $(ERR_S_FILES)
	$(PERL) ../makeStatTbl.pl  $(ERR_S_FILES)

