Now supports new config directory setup.

This commit is contained in:
Matt Needes
1994-07-21 13:13:02 +00:00
parent ad905176ee
commit b8f1b74f3a
4 changed files with 196 additions and 25 deletions

View File

@@ -1,7 +1,7 @@
#
# $Id$
#
# Top Level "Diabolical" EPICS Makefile
# Top Level EPICS Makefile
# by Matthew Needes and Mike Bordua
#
# Notes:
@@ -17,43 +17,45 @@
# is complete.
#
include config.mk
EPICS=..
include $(EPICS)/config/CONFIG_BASE
all: install
depends:
@(for FILE in ${BUILD_ARCHS}; \
@(for ARCH in ${BUILD_ARCHS}; \
do \
TEMP=`echo $$FILE | cut -d. -f2`; \
${MAKE} ${MFLAGS} $@.$$TEMP; \
${MAKE} ${MFLAGS} $@.$$ARCH; \
done)
pre_build:
@(for ARCH in ${BUILD_ARCHS}; \
do \
${MAKE} ${MFLAGS} $@.$$ARCH; \
done)
build_libs:
@(for FILE in ${BUILD_ARCHS}; \
@(for ARCH in ${BUILD_ARCHS}; \
do \
TEMP=`echo $$FILE | cut -d. -f2`; \
${MAKE} ${MFLAGS} $@.$$TEMP; \
${MAKE} ${MFLAGS} $@.$$ARCH; \
done)
install_libs:
@(for FILE in ${BUILD_ARCHS}; \
@(for ARCH in ${BUILD_ARCHS}; \
do \
TEMP=`echo $$FILE | cut -d. -f2`; \
${MAKE} ${MFLAGS} $@.$$TEMP; \
${MAKE} ${MFLAGS} $@.$$ARCH; \
done)
build:
@(for FILE in ${BUILD_ARCHS}; \
@(for ARCH in ${BUILD_ARCHS}; \
do \
TEMP=`echo $$FILE | cut -d. -f2`; \
${MAKE} ${MFLAGS} $@.$$TEMP; \
${MAKE} ${MFLAGS} $@.$$ARCH; \
done)
install:
@(for FILE in ${BUILD_ARCHS}; \
@(for ARCH in ${BUILD_ARCHS}; \
do \
TEMP=`echo $$FILE | cut -d. -f2`; \
${MAKE} ${MFLAGS} $@.$$TEMP; \
${MAKE} ${MFLAGS} $@.$$ARCH; \
done)
release: install
@@ -109,12 +111,21 @@ depends.%: dirs.%
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs depends
@tools/TouchFlag $@ ${TOUCH}
# Pre_build RULE syntax: make pre_build.arch
# e.g.: make pre_build.arch
# yacc/lex etc.
pre_build.%: depends.%
@echo $*: Performing Pre Build
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs pre_build
@tools/TouchFlag $@ ${TOUCH}
# Build_libs RULE syntax: make build_libs.arch
# e.g.: make build_libs.arch
#
# Build libraries (depends must be finished)
build_libs.%: depends.%
build_libs.%: pre_build.%
@echo $*: Building Libraries
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs build_libs
@tools/TouchFlag $@ ${TOUCH}

View File

@@ -1,11 +1,13 @@
#
# base $Id$
#
# "Diabolical" EPICS Makefile For Top-Level Subdirectory Recursions
# EPICS Makefile For Top-Level Subdirectory Recursions
# by Matthew Needes and Mike Bordua
#
include config.${T_A}.mk
EPICS=..
include $(EPICS)/config/CONFIG_BASE
include $(EPICS)/config/CONFIG_ARCH.${T_A}
MAKEOPT=${MFLAGS} -f Makefile.${BUILD_TYPE}
@@ -14,35 +16,42 @@ all: build
depends:
@(for DIR in ${DIRS}; \
do \
TMP=$$PWD; echo "${T_A}: --$$DIR"; \
TMP=$$PWD; echo "${T_A}: $@: $$DIR"; \
cd $$DIR; ${MAKE} ${MAKEOPT} $@; cd $$TMP;\
done)
pre_build:
@(for DIR in ${DIRS}; \
do \
TMP=$$PWD; echo "${T_A}: $@: $$DIR"; \
cd $$DIR; ${MAKE} ${MAKEOPT} $@; cd $$TMP;\
done)
build_libs:
@(for DIR in ${DIRS}; \
do \
TMP=$$PWD; echo "${T_A}: --$$DIR"; \
TMP=$$PWD; echo "${T_A}: $@: $$DIR"; \
cd $$DIR; ${MAKE} ${MAKEOPT} $@; cd $$TMP;\
done)
install_libs:
@(for DIR in ${DIRS}; \
do \
TMP=$$PWD; echo "${T_A}: --$$DIR"; \
TMP=$$PWD; echo "${T_A}: $@: $$DIR"; \
cd $$DIR; ${MAKE} ${MAKEOPT} $@; cd $$TMP;\
done)
build:
@(for DIR in ${DIRS}; \
do \
TMP=$$PWD; echo "${T_A}: --$$DIR"; \
TMP=$$PWD; echo "${T_A}: $@: $$DIR"; \
cd $$DIR; ${MAKE} ${MAKEOPT} $@; cd $$TMP;\
done)
install:
@(for DIR in ${DIRS}; \
do \
TMP=$$PWD; echo "${T_A}: --$$DIR"; \
TMP=$$PWD; echo "${T_A}: $@: $$DIR"; \
cd $$DIR; ${MAKE} ${MAKEOPT} $@; cd $$TMP;\
done)

149
README Normal file
View File

@@ -0,0 +1,149 @@
3.12 EPICS BASE release notes and build instructions.
----------------------------------------------------------------------------
Part 1 - Configuring and Building EPICS Base
----------------------------------------------------------------------------
1.1 To configure EPICS, edit the following files:
../config/CONFIG_BASE - Build choices/HOST_ARCH/Vx location
../config/CONFIG.Unix.* - For host directories/compilers/etc.
../config/CONFIG.Vx.* - For target directories/compilers/etc.
1.2 To add a target architecture to EPICS:
cd ../config
cp CONFIG_ARCH.mv167 CONFIG_ARCH.YOUR_ARCH
edit CONFIG_ARCH.YOUR_ARCH - For compiler flags / etc.
cp CONFIG_CLASS_vx.68k CONFIG_CLASS_vx.YOUR_ARCH_CLASS
- ONLY IF you are adding a new architecture class,
see note in Appendix A.
edit CONFIG_BASE - Add architecture to list.
1.3 To build EPICS:
make - To build and install EPICS.
make clean - To clean temporary object files.
1.4 To create an EPICS release:
edit include/version.h - ONLY IF you need to change the EPICS
version number.
tools/MakeRelease - To create release file.
tools/MakeRelease -b - To create release file WITH BINARIES.
NOTES:
1. tools/MakeRelease will create tar files in the directory ABOVE
base. These tar files are then meant to be untarred at that level.
2. EPICS binaries are kept in the bin/ARCH and lib/ARCH directories.
EPICS shellscripts are kept in the tools directory.
3. Temporary objects are stored in src/DIR/O.ARCH, so one can store
objects for multiple architectures at the same time. While
developing source for EPICS, use aliases to facilitate building
objects within these directories, e.g.:
alias make167 "make -f Makefile.Vx T_A=mv167"
make167 O.mv167/dbAccess.o
This example instructs make to build dbAccess.o for the
167 target using the Vx makefile.
----------------------------------------------------------------------------
Part 2 --- Configuration Files
----------------------------------------------------------------------------
Filename BUILD ADD_VX_ARCH ADD_UNIX_ARCH XBS
CONFIG - - - s
CONFIG_ARCH.ARCH - c c s
CONFIG_BASE m m m s
CONFIG.Unix.ARCH_CLASS m - c* s
CONFIG.Vx.ARCH_CLASS m c* - s
CONFIG_COMMON - - - x
CONFIG_vx - - - s
HRULES - - - x
RULES - - - x
RULES.Vx - - - b
RULES.Unix - - - b
m - Modify an existing file.
c - Create a new file.
* - Create an ARCH_CLASS file only if you are adding a
fundamentally new architecture, such as hp700 or
a SPARC VME board. If your board is 68k based,
you will not need to create CONFIG_SITE_vx.68k,
since it already exists !
x - File used in configuring EPICS extension products only.
b - File used in configuring EPICS base only.
s - File used for BOTH base and extensions.
----------------------------------------------------------------------------
Part 3 --- Configuration File Inclusion Tree Examples
----------------------------------------------------------------------------
---------------------------- hkv2f example --------------------------------
(files are numbered in the order of their inclusion)
src/db/Makefile.Vx (An example EPICS makefile)
^ ^
| +-- 2. RULES.Vx
| Make Dependency Rules.
|
+------ 1. CONFIG_vx
^ ^ ^
| | |
| | +---- 1. CONFIG_BASE
| | HOST_ARCH = sun4
| | BUILD_ARCHS = $(HOST_ARCH) mv167 hkv2f
| | VX_DIR = /vxworks
| | Lots More.
| +------- 2. CONFIG_ARCH.hkv2f
| BUILD_TYPE = Vx
| ARCH_CLASS = hkv2f
| Arch Specific Compiler Flag Setup
+---------- 3. CONFIG.Vx.68k
Directory Setup
Compiler/Utility Setup
---------------------------- sun4 example --------------------------------
src/db/Makefile.Unix (An example EPICS makefile)
^ ^
| +--- 2. RULES.Unix
| Make Dependency Rules.
|
+------- 1. CONFIG
^ ^ ^
| | |
| | +---- 1. CONFIG_BASE
| | HOST_ARCH = sun4
| | BUILD_ARCHS = $(HOST_ARCH) mv167 hkv2f
| | VX_DIR = /vxworks
| | Lots More.
| +------- 2. CONFIG_ARCH.sun4
| BUILD_TYPE = Unix
| ARCH_CLASS = sun4
| Arch Specific Compiler Flag Setup
+---------- 3. CONFIG.Unix.sun4
Directory Setup
Compiler/Utility Setup
----------------------------------------------------------------------------
Part 4 --- EPICS dependencies
----------------------------------------------------------------------------
Dependencies supported by lower level Makefiles:
depends - Generate include dependencies
pre_build - Build lex/yacc, miscellaneous
build_libs - Builds libraries for use in build dependency
install_libs - Install these libraries in lib/ARCH
build - Builds objects
install - Installs executables in bin/ARCH

View File

@@ -7,6 +7,8 @@ all: install
depends:
pre_build:
build_libs:
install_libs: