From 62641912d31fa9e64c2658217451dbd6984c374c Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Thu, 20 Apr 2017 16:59:22 +0200 Subject: [PATCH] Fix for non-PSI build --- GNUmakefile | 15 +++++++++++---- Makefile | 16 +++++++++++----- configure/CONFIG | 14 ++++++++++++++ configure/CONFIG_APP | 22 ++++++++++++++++++++++ configure/Makefile | 15 +++++++++++++++ configure/RELEASE | 22 ++++++++++++++++++++++ configure/RULES | 5 +++++ 7 files changed, 100 insertions(+), 9 deletions(-) create mode 100644 configure/CONFIG create mode 100644 configure/CONFIG_APP create mode 100644 configure/Makefile create mode 100644 configure/RELEASE create mode 100644 configure/RULES diff --git a/GNUmakefile b/GNUmakefile index ceef472..d2388a2 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,3 +1,7 @@ +ifeq ($(wildcard /ioc/tools/driver.makefile),) +$(warning It seems you do not have the PSI build environment. Remove GNUmakefile.) +include Makefile +else include /ioc/tools/driver.makefile BUILDCLASSES += Linux @@ -10,10 +14,6 @@ DBDS += runScript.dbd SOURCES += dbLoadTemplate.y DBDS += dbLoadTemplate.dbd -dbLoadTemplate.c: dbLoadTemplate_lex.c ../dbLoadTemplate.h - -#HEADERS += require.h - SOURCES_T2 += strdup.c SOURCES_vxWorks += asprintf.c HEADERS += strdup.h asprintf.h @@ -24,3 +24,10 @@ USR_INCLUDES_Linux=-idirafter ${EPICS_BASE}/include # Pass T_A to the code USR_CFLAGS += -DT_A=${T_A} + +# This should really go into some global WIN32 config file +USR_CFLAGS_WIN32 += /D_WIN32_WINNT=0x501 + +dbLoadTemplate.c: dbLoadTemplate_lex.c ../dbLoadTemplate.h + +endif diff --git a/Makefile b/Makefile index 4a4fb4d..4d5a232 100644 --- a/Makefile +++ b/Makefile @@ -2,19 +2,23 @@ TOP=.. include $(TOP)/configure/CONFIG -# library LOADABLE_LIBRARY = require +DBD = requireSup.dbd + LIB_SRCS += require_registerRecordDeviceDriver.cpp LIB_SRCS += require.c +requireSup_DBD += require.dbd + LIB_SRCS += runScript.c +requireSup_DBD += runScript.dbd + +LIB_SRCS += dbLoadTemplate.y +requireSup_DBD += dbLoadTemplate.dbd + LIB_SRCS_vxWorks = asprintf.c strdup.c LIB_SRCS_WIN32 = asprintf.c -DBD = requireSup.dbd -requireSup_DBD += require.dbd -requireSup_DBD += runScript.dbd - LIB_LIBS += $(EPICS_BASE_IOC_LIBS) # We need to find the Linux link.h before the EPICS link.h @@ -27,3 +31,5 @@ USR_CFLAGS += -DT_A=${T_A} USR_CFLAGS_WIN32 += /D_WIN32_WINNT=0x501 include $(TOP)/configure/RULES + +dbLoadTemplate.c: dbLoadTemplate_lex.c ../dbLoadTemplate.h diff --git a/configure/CONFIG b/configure/CONFIG new file mode 100644 index 0000000..b46d386 --- /dev/null +++ b/configure/CONFIG @@ -0,0 +1,14 @@ +#CONFIG +include $(TOP)/configure/CONFIG_APP +# Add any changes to make definitions here + +#CROSS_COMPILER_TARGET_ARCHS = vxWorks-68040 +#CROSS_COMPILER_TARGET_ARCHS = + +# Use this when your IOC and the host use different paths +# to access the application. Typically this will be +# used with the Microsoft FTP server or with NFS mounts. Use +# is indicated by failure of the cdCommands script on +# vxWorks. You must rebuild in the iocBoot directory +# before this takes effect. +#IOCS_APPL_TOP = diff --git a/configure/CONFIG_APP b/configure/CONFIG_APP new file mode 100644 index 0000000..96eb2d5 --- /dev/null +++ b/configure/CONFIG_APP @@ -0,0 +1,22 @@ +# CONFIG_APP + +include $(TOP)/configure/RELEASE +-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH) +-include $(TOP)/configure/RELEASE.Common.$(T_A) +-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).$(T_A) + +CONFIG=$(EPICS_BASE)/configure +include $(CONFIG)/CONFIG + +INSTALL_LOCATION = $(TOP) +ifdef INSTALL_LOCATION_APP +INSTALL_LOCATION = $(INSTALL_LOCATION_APP) +endif + +ifdef T_A +-include $(TOP)/configure/O.$(T_A)/CONFIG_APP_INCLUDE +endif + +# dbst based database optimization (default: NO) +DB_OPT = NO +HOST_OPT=NO diff --git a/configure/Makefile b/configure/Makefile new file mode 100644 index 0000000..0317746 --- /dev/null +++ b/configure/Makefile @@ -0,0 +1,15 @@ +# Makefile + +TOP=.. + +include $(TOP)/configure/CONFIG + +# Set the following to NO to disable consistency checking of +# the support applications defined in $(TOP)/configure/RELEASE +CHECK_RELEASE = YES + +TARGETS = $(CONFIG_TARGETS) +CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS))) + +include $(TOP)/configure/RULES + diff --git a/configure/RELEASE b/configure/RELEASE new file mode 100644 index 0000000..dc263eb --- /dev/null +++ b/configure/RELEASE @@ -0,0 +1,22 @@ +#RELEASE Location of external products +# Run "gnumake clean uninstall install" in the application +# top directory each time this file is changed. +# +# NOTE: The build does not check dependancies on files +# external to this application. Thus you should run +# "gnumake clean uninstall install" in the top directory +# each time EPICS_BASE, SNCSEQ, or any other external +# module defined in the RELEASE file is rebuilt. + +TEMPLATE_TOP=$(EPICS_BASE)/templates/makeBaseApp/top + +# If you don't want to install into $(TOP) then +# define INSTALL_LOCATION_APP here +#INSTALL_LOCATION_APP= + +# EPICS_BASE usually appears last so other apps can override stuff: +EPICS_BASE=/usr/local/epics/base-3.14.12 + +#Want to use md command with global variables? +#Set path to symbolname library +#SYMBOLNAME= diff --git a/configure/RULES b/configure/RULES new file mode 100644 index 0000000..ffee54a --- /dev/null +++ b/configure/RULES @@ -0,0 +1,5 @@ +#CONFIG +include $(EPICS_BASE)/configure/RULES + +# Library should be rebuilt because LIBOBJS may have changed. +$(LIBNAME): ../Makefile