mirror of
https://github.com/GnoConsortium/gno.git
synced 2024-06-13 06:29:37 +00:00
- got binrules.mk, binconst.mk, and prog.mk working together properly
- reduce the number of shell meta characters in recipes - use catrez instead of copyfork
This commit is contained in:
parent
f8cc5f9ba2
commit
8774b23e30
19
binconst.mk
19
binconst.mk
|
@ -2,24 +2,27 @@
|
||||||
# Compilation constants for utilities (directories ./bin, ./sbin,
|
# Compilation constants for utilities (directories ./bin, ./sbin,
|
||||||
# ./usr.bin, ./usr.sbin). These are not used when building the libraries.
|
# ./usr.bin, ./usr.sbin). These are not used when building the libraries.
|
||||||
#
|
#
|
||||||
# $Id: binconst.mk,v 1.1 1997/08/08 04:44:13 gdr Exp $
|
# $Id: binconst.mk,v 1.2 1997/09/24 06:43:52 gdr Exp $
|
||||||
#
|
#
|
||||||
# Devin Reade, 1997.
|
# Devin Reade, 1997.
|
||||||
#
|
#
|
||||||
|
|
||||||
DEFINES +=
|
DEFINES +=
|
||||||
CFLAGS += -v -w
|
CFLAGS += -w
|
||||||
LDFLAGS += -v
|
LDFLAGS +=
|
||||||
LDLIBS +=
|
LDLIBS +=
|
||||||
|
|
||||||
COPYFORK = /usr/orca/bin/copyfork
|
# WARNING: You *must* use descu v1.0.4 or later for these builds.
|
||||||
INSTALL = /usr/bin/install
|
|
||||||
DESCU = /usr/sbin/descu
|
DESCU = /usr/sbin/descu
|
||||||
|
COPYFORK = /usr/orca/bin/copyfork
|
||||||
|
CATREZ = /usr/bin/catrez
|
||||||
|
INSTALL = /usr/bin/install
|
||||||
|
|
||||||
# This is the created source file for the describe(1) database.
|
# $(DESC_SRC) is the created source file for the describe(1) database.
|
||||||
DESC_SRC = $(RELEASE_DIR)/usr/lib/describe.src
|
DESC_DIR = $(RELEASE_DIR)/usr/lib
|
||||||
|
DESC_SRC = $(DESC_DIR)/describe.src
|
||||||
|
|
||||||
# Define SRCS if it's not already done.
|
# If no source files were defined, use program name
|
||||||
.IF $(SRCS) == $(NULL)
|
.IF $(SRCS) == $(NULL)
|
||||||
SRCS = $(PROG).c
|
SRCS = $(PROG).c
|
||||||
.END
|
.END
|
||||||
|
|
31
binrules.mk
31
binrules.mk
|
@ -2,22 +2,35 @@
|
||||||
# Standard compilation rules for utilities (directories ./bin, ./sbin,
|
# Standard compilation rules for utilities (directories ./bin, ./sbin,
|
||||||
# ./usr.bin, ./usr.sbin). These are not used when building the libraries.
|
# ./usr.bin, ./usr.sbin). These are not used when building the libraries.
|
||||||
#
|
#
|
||||||
# $Id: binrules.mk,v 1.1 1997/08/08 04:44:13 gdr Exp $
|
# $Id: binrules.mk,v 1.2 1997/09/24 06:43:53 gdr Exp $
|
||||||
#
|
#
|
||||||
# Devin Reade, 1997.
|
# Devin Reade, Dave Tribby, 1997.
|
||||||
#
|
#
|
||||||
|
|
||||||
build: $(PROG)
|
# Default target, "build," generates the program file
|
||||||
|
build: $(PROG)
|
||||||
|
|
||||||
|
# Create the main program file with a ".root" and set the stack size.
|
||||||
|
# Include standard occ options
|
||||||
|
# -a0: use .o suffix for object file
|
||||||
|
# -c: don't link after compiling
|
||||||
|
$(PROG).o: $(PROG).c
|
||||||
|
$(CC) $(CFLAGS:s/ -r / /) -a0 -c $(PROG).c
|
||||||
|
|
||||||
|
# Program depends upon all the objects. Add the version resource.
|
||||||
$(PROG): $(OBJS) $(PROG).r
|
$(PROG): $(OBJS) $(PROG).r
|
||||||
$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LDLIBS)
|
$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LDLIBS)
|
||||||
$(COPYFORK) $(PROG).r $@ -r
|
$(CATREZ) -d $@ $(PROG).r
|
||||||
|
|
||||||
|
# Remove intermediate files. If we don't put shell meta characters in
|
||||||
|
# here, then dmake doesn't have to start up a subshell and can instead
|
||||||
|
# exec the line directly
|
||||||
clean:
|
clean:
|
||||||
-$(RM) -f *.o
|
-$(RM) -f $(OBJS)
|
||||||
-$(RM) -f *.root
|
-$(RM) -f $(PROG).root
|
||||||
-$(RM) -f *.r
|
-$(RM) -f $(PROG).r
|
||||||
-$(RM) -f *.rej
|
-$(RM) -f $(PROG).rej
|
||||||
|
|
||||||
|
# Remove intermediate files and program file
|
||||||
clobber: clean
|
clobber: clean
|
||||||
-$(RM) $(PROG)
|
-$(RM) $(PROG)
|
||||||
|
|
59
prog.mk
59
prog.mk
|
@ -1,5 +1,7 @@
|
||||||
#
|
#
|
||||||
# gno.prog.mk version 1.1.0 (August 31, 1997)
|
# prog.mk version 1.1.0 (August 31, 1997)
|
||||||
|
#
|
||||||
|
# $Id: prog.mk,v 1.2 1997/09/24 06:43:53 gdr Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
# This makefile is intended for use with dmake(1) and occ(1) on Apple IIGS
|
# This makefile is intended for use with dmake(1) and occ(1) on Apple IIGS
|
||||||
|
@ -35,24 +37,16 @@
|
||||||
# stack size to 4096, and to set the "__STACK_CHECK__" macro:
|
# stack size to 4096, and to set the "__STACK_CHECK__" macro:
|
||||||
# dmake DEBUG=25 STACK=4096 DEFINES=-D__STACK_CHECK__
|
# dmake DEBUG=25 STACK=4096 DEFINES=-D__STACK_CHECK__
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Created by Dave Tribby, July 1997
|
# Created by Dave Tribby, July 1997
|
||||||
#
|
#
|
||||||
|
|
||||||
.INCLUDE: <paths.mk>
|
.INCLUDE: /src/gno/paths.mk
|
||||||
|
.INCLUDE: /src/gno/binconst.mk
|
||||||
.INCLUDE: <binconst.mk>
|
|
||||||
|
|
||||||
# If no source files were defined, use program name
|
|
||||||
.IF $(SRCS) == $(NULL)
|
|
||||||
SRCS = $(PROG).c
|
|
||||||
.END
|
|
||||||
|
|
||||||
# Objects are source file names with .c changed to .o
|
# Objects are source file names with .c changed to .o
|
||||||
OBJS=$(SRCS:s/.c/.o/:f)
|
OBJS=$(SRCS:s/.c/.o/:f)
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check for user-specified compile/load options
|
# Check for user-specified compile/load options
|
||||||
#
|
#
|
||||||
|
@ -72,7 +66,6 @@ OBJS=$(SRCS:s/.c/.o/:f)
|
||||||
STACK = 768
|
STACK = 768
|
||||||
.END
|
.END
|
||||||
|
|
||||||
|
|
||||||
# Compile and load flags passed to occ
|
# Compile and load flags passed to occ
|
||||||
# -r: don't create .root file (used on all but main file)
|
# -r: don't create .root file (used on all but main file)
|
||||||
CFLAGS += -r -O$(OPTIMIZE) $(DEFINES) -s$(STACK)
|
CFLAGS += -r -O$(OPTIMIZE) $(DEFINES) -s$(STACK)
|
||||||
|
@ -89,48 +82,12 @@ CFLAGS += -r -O$(OPTIMIZE) $(DEFINES) -s$(STACK)
|
||||||
RELBIN = $(RELEASE_DIR)$(BINDIR)
|
RELBIN = $(RELEASE_DIR)$(BINDIR)
|
||||||
RELMAN = $(RELEASE_DIR)$(MANDIR)
|
RELMAN = $(RELEASE_DIR)$(MANDIR)
|
||||||
|
|
||||||
### ------------------------------------------------------------
|
.INCLUDE: /src/gno/binrules.mk
|
||||||
### The following section could be replaced by <binrules.mk> if
|
|
||||||
### a few minor changes were made to <binrules.mk>
|
|
||||||
|
|
||||||
CATREZ = /usr/local/bin/catrez
|
|
||||||
|
|
||||||
|
|
||||||
# Default target, "build," generates the program file
|
|
||||||
build: $(PROG)
|
|
||||||
|
|
||||||
# Create the main program file with a ".root" and set the stack size.
|
|
||||||
# Include standard occ options
|
|
||||||
# -a0: use .o suffix for object file
|
|
||||||
# -c: don't link after compiling
|
|
||||||
$(PROG).o: $(PROG).c
|
|
||||||
$(CC) $(CFLAGS:s/ -r / /) -a0 -c $(PROG).c
|
|
||||||
|
|
||||||
# Program depends upon all the objects. Add the version resource.
|
|
||||||
$(PROG): $(OBJS) $(PROG).r
|
|
||||||
$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LDLIBS)
|
|
||||||
$(CATREZ) -d $@ $(PROG).r
|
|
||||||
|
|
||||||
# Remove intermediate files
|
|
||||||
clean:
|
|
||||||
-$(RM) -f *.o
|
|
||||||
-$(RM) -f *.root
|
|
||||||
-$(RM) -f *.r
|
|
||||||
-$(RM) -f *.rej
|
|
||||||
|
|
||||||
# Remove intermediate files and program file
|
|
||||||
clobber: clean
|
|
||||||
-$(RM) $(PROG)
|
|
||||||
|
|
||||||
### End of section that could be replaced by <binrules.mk>
|
|
||||||
### ------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
# Place files where they will subsequently be archived in a binary
|
# Place files where they will subsequently be archived in a binary
|
||||||
# distribution.
|
# distribution.
|
||||||
release:
|
release:
|
||||||
$(INSTALL) -d $(RELBIN) $(RELMAN)/man1
|
$(INSTALL) -d $(RELBIN) $(RELMAN)/man1 $(DESC_DIR)
|
||||||
$(INSTALL) $(PROG) $(RELBIN)
|
$(INSTALL) $(PROG) $(RELBIN)
|
||||||
$(INSTALL) $(PROG).1 $(RELMAN)/man1
|
$(INSTALL) $(PROG).1 $(RELMAN)/man1
|
||||||
$(DESCU) $(DESC_SRC) $(DESC) > /tmp/describe.src
|
$(DESCU) -o $(DESC_SRC) $(DESC_SRC) $(DESC)
|
||||||
$(MV) /tmp/describe.src $(DESC_SRC)
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user