333 lines
6.7 KiB
Text
333 lines
6.7 KiB
Text
head 2.1;
|
|
access;
|
|
symbols
|
|
V4_1_1_1:2.1
|
|
Rel_2_1:2.1;
|
|
locks; strict;
|
|
comment @# @;
|
|
|
|
|
|
2.1
|
|
date 2000.05.29.13.53.07; author cibrario; state Rel;
|
|
branches;
|
|
next 1.2;
|
|
|
|
1.2
|
|
date 96.06.11.13.03.06; author cibrario; state Beta;
|
|
branches;
|
|
next 1.1;
|
|
|
|
1.1
|
|
date 96.05.29.09.12.10; author cibrario; state Exp;
|
|
branches;
|
|
next ;
|
|
|
|
|
|
desc
|
|
@Makefile for the CHF library
|
|
@
|
|
|
|
|
|
2.1
|
|
log
|
|
@- Deep revision to support transparent, multi-platform builds
|
|
- Added multithreading support
|
|
- New/revised targets: test, doc, clean
|
|
@
|
|
text
|
|
@# .+
|
|
#
|
|
# .identifier : $Id: Makefile,v 1.2 1996/06/11 13:03:06 cibrario Beta cibrario $
|
|
# .context : CHF, Condition Handling Facility
|
|
# .title : $RCSfile: Makefile,v $, Makefile
|
|
# .kind : Makefile
|
|
# .author : Ivan Cibrario B.
|
|
# .site : CSTV-CNR
|
|
# .creation : 3-May-1996
|
|
# .keywords : *
|
|
# .description :
|
|
# Makefile for the CHF library
|
|
# .notes :
|
|
# $Log: Makefile,v $
|
|
# Revision 1.2 1996/06/11 13:03:06 cibrario
|
|
# Added new module chf_top.c
|
|
#
|
|
# Revision 1.1 1996/05/29 09:12:10 cibrario
|
|
# Initial revision
|
|
#
|
|
#
|
|
# .-
|
|
|
|
#
|
|
# Platform-dependent definitions. Edit when required, for example to
|
|
# add a new platform.
|
|
#
|
|
# There is a set of definitions per platform; the prefix or the definition
|
|
# names is the value returned by a plain 'uname' on that platform.
|
|
#
|
|
# CC: cc compiler
|
|
# TS_CFLAGS: cc flags to enable multithreading
|
|
# TS_LOADLIBES: ld flags and additional libraries to enable multithreading
|
|
# F_CFLAGS: cc feature test macros
|
|
# O_CFLAGS: cc optimization control flags and other, additional flags
|
|
#
|
|
# Supported platforms:
|
|
# OSF1 Digital UNIX v4.0
|
|
# SunOS Solaris v2.6
|
|
# Linux Linux 2.1
|
|
#
|
|
|
|
OSF1_CC = cc
|
|
OSF1_TS_CFLAGS = -pthread
|
|
OSF1_TS_LOADLIBES = -pthread
|
|
OSF1_F_CFLAGS = "-D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE"
|
|
OSF1_O_CFLAGS = "-O3 -std1"
|
|
|
|
SunOS_CC = gcc
|
|
SunOS_TS_CFLAGS = -D_REENTRANT
|
|
SunOS_TS_LOADLIBES = -lpthread
|
|
SunOS_F_CFLAGS = -D_POSIX_C_SOURCE=199506L
|
|
SunOS_O_CFLAGS = "-O3 -ansi -pedantic"
|
|
|
|
Linux_CC = cc
|
|
Linux_TS_CFLAGS = -D_REENTRANT
|
|
Linux_TS_LOADLIBES = -lpthread
|
|
Linux_F_CFLAGS = -D_POSIX_C_SOURCE=199506L
|
|
Linux_O_CFLAGS = "-O3 -ansi -pedantic"
|
|
|
|
#
|
|
# Destination paths for library objects, C headers, binaries, message catalog
|
|
# sources and X resource files. Edit as required.
|
|
#
|
|
DESTLIBDIR = $(HOME)/lib
|
|
DESTHDRDIR = $(HOME)/include
|
|
DESTBINDIR = $(HOME)/bin
|
|
DESTMSFDIR = $(HOME)/msf
|
|
DESTRESDIR = $(HOME)/res
|
|
|
|
#
|
|
# The default target recursively invokes make defining UNAME to the
|
|
# string returned by uname; this is used to make appropriate
|
|
# platform-dependent definitions above.
|
|
#
|
|
default:
|
|
@@$(MAKE) UNAME=`uname` all
|
|
|
|
#
|
|
# Vectored definitions; see above and do not edit.
|
|
#
|
|
CC = $($(UNAME)_CC)
|
|
TS_CFLAGS = $($(UNAME)_TS_CFLAGS)
|
|
TS_LOADLIBES = $($(UNAME)_TS_LOADLIBES)
|
|
F_CFLAGS = $($(UNAME)_F_CFLAGS)
|
|
O_CFLAGS = $($(UNAME)_O_CFLAGS)
|
|
|
|
#
|
|
# Include common definitions
|
|
#
|
|
include Makefile_def
|
|
|
|
#
|
|
# Build directories for single-threaded and multi-threaded lib versions
|
|
#
|
|
ST_BUILD_DIR = ./st_build
|
|
MT_BUILD_DIR = ./mt_build
|
|
|
|
#
|
|
# Library names
|
|
#
|
|
ST_LIB_NAME = libChf.a
|
|
MT_LIB_NAME = libChf_r.a
|
|
|
|
#
|
|
# Library paths
|
|
#
|
|
ST_LIB_PATH = $(ST_BUILD_DIR)/$(ST_LIB_NAME)
|
|
MT_LIB_PATH = $(MT_BUILD_DIR)/$(MT_LIB_NAME)
|
|
|
|
#
|
|
# all: Create and populate build directories; for each build directory,
|
|
# make dependencies and rebuild
|
|
#
|
|
all: $(ST_LIB_PATH) $(MT_LIB_PATH)
|
|
|
|
#
|
|
# test: Build and executes test programs
|
|
#
|
|
test:
|
|
@@$(MAKE) UNAME=`uname` do_test
|
|
@@echo "All tests completed successfully"
|
|
|
|
do_test: $(ST_LIB_PATH) $(MT_LIB_PATH)
|
|
@@cd $(ST_BUILD_DIR) && \
|
|
$(MAKE) test CC=$(CC) LIB=$(ST_LIB_NAME) \
|
|
F_CFLAGS=$(F_CFLAGS) O_CFLAGS=$(O_CFLAGS) > test.log 2>&1
|
|
@@cd $(MT_BUILD_DIR) && \
|
|
$(MAKE) test CC=$(CC) LIB=$(MT_LIB_NAME) \
|
|
F_CFLAGS=$(F_CFLAGS) O_CFLAGS=$(O_CFLAGS) \
|
|
TS_CFLAGS=$(TS_CFLAGS) TS_LOADLIBES=$(TS_LOADLIBES) >> test.log 2>&1
|
|
|
|
#
|
|
# doc: Make documentation files
|
|
#
|
|
doc:
|
|
makeinfo chf.texi
|
|
texi2dvi chf.texi; dvips -o chf.ps chf.dvi
|
|
|
|
#
|
|
# clean: Remove build directories
|
|
#
|
|
clean:
|
|
rm -rf $(ST_BUILD_DIR) $(MT_BUILD_DIR)
|
|
|
|
#
|
|
# install: Move all files to their directories
|
|
#
|
|
install: $(ST_LIB_PATH) $(MT_LIB_PATH) $(HDR) $(MSF) $(RES)
|
|
chmod u+w $(ST_LIB_PATH) $(MT_LIB_PATH) $(BIN) $(HDR) $(MSF) $(RES)
|
|
cp $(ST_LIB_PATH) $(MT_LIB_PATH) $(DESTLIBDIR)
|
|
cp $(HDR) $(DESTHDRDIR)
|
|
cp $(MSF) $(DESTMSFDIR)
|
|
echo cp $(RES) $(DESTRESDIR)
|
|
|
|
#
|
|
# Prepare the build directories for use
|
|
#
|
|
$(ST_BUILD_DIR) $(MT_BUILD_DIR):
|
|
@@mkdir $@@ && \
|
|
cd $@@ && \
|
|
ln -s ../Makefile_sub Makefile && \
|
|
for s in $(SRC) $(TSRC) $(HDR) $(MSF) $(TMSF) $(RES) ; do \
|
|
ln -s ../$$s $$s ; \
|
|
done
|
|
|
|
#
|
|
# Make the libraries; the rebuild is forced here because only the
|
|
# sub-makes have module dependencies.
|
|
#
|
|
$(ST_LIB_PATH): $(ST_BUILD_DIR) force
|
|
@@cd $(ST_BUILD_DIR) && \
|
|
$(MAKE) depend CC=$(CC) LIB=$(ST_LIB_NAME) \
|
|
F_CFLAGS=$(F_CFLAGS) O_CFLAGS=$(O_CFLAGS) && \
|
|
$(MAKE) all CC=$(CC) LIB=$(ST_LIB_NAME) \
|
|
F_CFLAGS=$(F_CFLAGS) O_CFLAGS=$(O_CFLAGS)
|
|
|
|
$(MT_LIB_PATH): $(MT_BUILD_DIR) force
|
|
@@cd $(MT_BUILD_DIR) && \
|
|
$(MAKE) depend CC=$(CC) LIB=$(MT_LIB_NAME) \
|
|
F_CFLAGS=$(F_CFLAGS) O_CFLAGS=$(O_CFLAGS) \
|
|
TS_CFLAGS=$(TS_CFLAGS) TS_LOADLIBES=$(TS_LOADLIBES) && \
|
|
$(MAKE) all CC=$(CC) LIB=$(MT_LIB_NAME) \
|
|
F_CFLAGS=$(F_CFLAGS) O_CFLAGS=$(O_CFLAGS) \
|
|
TS_CFLAGS=$(TS_CFLAGS) TS_LOADLIBES=$(TS_LOADLIBES)
|
|
|
|
force:
|
|
@
|
|
|
|
|
|
1.2
|
|
log
|
|
@Added new module chf_top.c
|
|
@
|
|
text
|
|
@d3 1
|
|
a3 1
|
|
# .identifier : $Id: Makefile,v 1.1 1996/05/29 09:12:10 cibrario Exp cibrario $
|
|
d15 3
|
|
d25 37
|
|
d63 1
|
|
a63 1
|
|
# sources and X resource files.
|
|
d72 9
|
|
a80 1
|
|
# Source files
|
|
d82 5
|
|
a86 3
|
|
SRC = chf_init.c chf_gen.c chf_sig.c chf_abrt.c chf_hdlr.c \
|
|
chf_msgc.c chf_st.c \
|
|
chf_top.c
|
|
d88 4
|
|
a91 1
|
|
HDR = Chf.h ChfPriv.h
|
|
d93 5
|
|
a97 1
|
|
MSF = chf.msf
|
|
d99 5
|
|
a103 1
|
|
RES =
|
|
d106 1
|
|
a106 1
|
|
# Targets
|
|
d108 2
|
|
a109 3
|
|
OBJ = $(SRC:.c=.o)
|
|
LIB = libChf.a
|
|
BIN =
|
|
d111 5
|
|
d118 1
|
|
a118 1
|
|
# Other definitions
|
|
d120 3
|
|
a122 3
|
|
HPATH = -I. -I$(DESTHDRDIR)
|
|
LPATH = -L. -L$(DESTLIBDIR)
|
|
OFLAG = -O
|
|
d124 8
|
|
a131 2
|
|
CFLAGS = $(OFLAG) $(U_CFLAGS) $(HPATH)
|
|
LDFLAGS = $(LPATH)
|
|
d134 1
|
|
a134 3
|
|
# setenv U_LOADLIBES "-li" on Ultrix
|
|
# setenv U_LOADLIBES "" on Digital UNIX
|
|
# setenv U_LOADLIBES "-lintl" on SCO UNIX
|
|
d136 3
|
|
a138 1
|
|
LOADLIBES = $(LIB) $(U_LOADLIBES)
|
|
d141 1
|
|
a141 1
|
|
# Targets
|
|
d143 2
|
|
a144 1
|
|
all: $(LIB) $(BIN)
|
|
d146 6
|
|
a151 4
|
|
install: $(LIB) $(BIN) $(HDR) $(MSF)
|
|
chmod u+w $(LIB) $(BIN) $(HDR) $(MSF)
|
|
cp $(LIB) $(DESTLIBDIR)
|
|
echo cp $(BIN) $(DESTBINDIR)
|
|
d156 30
|
|
a185 8
|
|
depend: $(SRC)
|
|
makedepend $(HPATH) $(SRC)
|
|
|
|
lint:
|
|
$(LINT) -u $(CFLAGS) $(SRC)
|
|
|
|
$(LIB): $(OBJ)
|
|
$(AR) $(ARFLAGS) $@@ $?
|
|
d187 1
|
|
a187 1
|
|
test: test.c $(LIB)
|
|
@
|
|
|
|
|
|
1.1
|
|
log
|
|
@Initial revision
|
|
@
|
|
text
|
|
@d3 1
|
|
a3 1
|
|
# .identifier : $Id$
|
|
d5 1
|
|
a5 1
|
|
# .title : $RCSfile$, Makefile
|
|
d14 3
|
|
a16 1
|
|
# $Log$
|
|
d18 1
|
|
d35 2
|
|
a36 1
|
|
chf_msgc.c chf_st.c
|
|
@
|