mirror of https://github.com/GnoConsortium/gno.git
- Makefiles now have common 'release' and 'install' targets
- most Makefiles now use gno/lib/lib.mk (not all of libc has been done yet)
This commit is contained in:
parent
c8e574bab7
commit
6bfb3527a9
13
lib/const.mk
13
lib/const.mk
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
# Devin Reade, 1997
|
||||
#
|
||||
# $Id: const.mk,v 1.4 1997/12/21 20:04:19 gdr Exp $
|
||||
# $Id: const.mk,v 1.5 1998/02/08 03:47:15 gdr-ftp Exp $
|
||||
#
|
||||
# It is critical that 13/orcacdefs/defaults.h is set up correctly,
|
||||
# including #defines for __appleiigs__ and __GNO__. For the purpose
|
||||
|
@ -22,6 +22,17 @@ LDFLAGS +=
|
|||
INSTALL = /usr/bin/install
|
||||
CATREZ = /usr/bin/catrez
|
||||
|
||||
# Where libraries get installed. Most libraries should go into the
|
||||
# USRLIBDIR; only "special" libraries belong in LIBDIR
|
||||
LIBDIR = /lib
|
||||
USRLIBDIR = /usr/lib
|
||||
RELLIB = $(RELEASE_DIR)$(LIBDIR)
|
||||
RELUSRLIB = $(RELEASE_DIR)$(USRLIBDIR)
|
||||
|
||||
# Byteworks' makelib pukes ... these object files are too much for it.
|
||||
MAKELIB = 17/makelib.apw
|
||||
MAKELIBFLAGS = -w -r -p
|
||||
|
||||
# This is the name of the library we're building. We define LIBPFX if
|
||||
# it's not in the current directory.
|
||||
LIBTARGET = $(LIBPFX)lib$(LIB)
|
||||
|
|
10
lib/lib.mk
10
lib/lib.mk
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# $Id: lib.mk,v 1.1 1998/01/26 05:49:01 taubert Exp $
|
||||
# $Id: lib.mk,v 1.2 1998/02/08 03:47:17 gdr-ftp Exp $
|
||||
#
|
||||
|
||||
.INCLUDE: /src/gno/paths.mk
|
||||
|
@ -25,6 +25,12 @@ OBJS= $(SRCS:s/.c/.o/:f)
|
|||
# Compile and load flags passed to occ
|
||||
CFLAGS+= -O$(OPTIMIZE)
|
||||
|
||||
# default target
|
||||
build: $(LIBTARGET)
|
||||
|
||||
# Update library with out of date object files
|
||||
lib$(LIB): $(OBJS)
|
||||
$(LIBTARGET): $(OBJS)
|
||||
$(MAKELIB) $(MAKELIBFLAGS) -l $@ $^
|
||||
|
||||
.INCLUDE: /src/gno/lib/librelease.mk
|
||||
|
||||
|
|
|
@ -10,16 +10,26 @@
|
|||
#
|
||||
# Devin Reade, 1997.
|
||||
#
|
||||
# $Id: Makefile,v 1.6 1997/10/03 04:42:51 gdr Exp $
|
||||
# $Id: Makefile,v 1.7 1998/02/08 03:47:22 gdr-ftp Exp $
|
||||
#
|
||||
|
||||
LIB = c
|
||||
|
||||
.INCLUDE: ../../paths.mk
|
||||
.INCLUDE: ../const.mk
|
||||
|
||||
USE_SLASH_LIB = true # This library goes into /lib.
|
||||
|
||||
ORCALIB_OBJ = \
|
||||
$(ORCA_SRC)/orcalib/obj/assert.a
|
||||
|
||||
libc:
|
||||
$(MAKELIB) $(MAKELIBFLAGS) -l $@ $(ORCALIB_OBJ)
|
||||
libc: $(ORCALIB_OBJ)
|
||||
$(MAKELIB) $(MAKELIBFLAGS) -l $@ $^
|
||||
|
||||
$(ORCALIB_OBJ):; true
|
||||
|
||||
.INCLUDE: ../librelease.mk
|
||||
|
||||
$(LIBTARGET):: lib$(LIB).r
|
||||
$(CATREZ) -d $@ lib$(LIB).r
|
||||
|
||||
.PHONY: libc
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Resources for version and comment
|
||||
*
|
||||
* $Id: libc.rez,v 1.1 1998/02/08 03:47:25 gdr-ftp Exp $
|
||||
*/
|
||||
|
||||
#define LIB "libc for GNO"
|
||||
#define PORTED "Ported from 4.4BSD and other sources by Devin Reade."
|
||||
|
||||
#include "Types.rez"
|
||||
|
||||
/*
|
||||
* Version
|
||||
*/
|
||||
resource rVersion (1, purgeable3) {
|
||||
{ 2, 0, 6, /* Version 2.0.6 */
|
||||
beta, /* development|alpha|beta|final|release */
|
||||
3 }, /* non-final release number */
|
||||
verUS, /* Country */
|
||||
LIB,
|
||||
PORTED
|
||||
};
|
||||
|
||||
/*
|
||||
* Comment
|
||||
*/
|
||||
resource rComment (1, purgeable3) {
|
||||
LIB "\n"
|
||||
PORTED
|
||||
};
|
|
@ -1,28 +1,17 @@
|
|||
#
|
||||
# This is the top-level makefile for libcontrib, GNO v2.0.6
|
||||
# This is the makefile for libcontrib, GNO v2.0.6
|
||||
#
|
||||
# $Id: Makefile,v 1.2 1997/10/30 04:57:24 gdr Exp $
|
||||
# $Id: Makefile,v 1.3 1998/02/08 03:47:29 gdr-ftp Exp $
|
||||
#
|
||||
|
||||
.INCLUDE: ../../paths.mk
|
||||
.INCLUDE: ../const.mk
|
||||
LIB = contrib
|
||||
SRCS = copyfile.c expandpath.c strarray.c xalloc.c
|
||||
OPTIMIZE = 78
|
||||
CFLAGS += -I. -Slibcontrib
|
||||
|
||||
LIB = libcontrib
|
||||
OBJS = copyfile.o expandpath.o strarray.o xalloc.o
|
||||
HEADER = contrib.h
|
||||
LIBDIR = $(RELEASE_DIR)/usr/lib
|
||||
INCDIR = $(RELEASE_DIR)/usr/include/gno
|
||||
.INCLUDE: /src/gno/lib/lib.mk
|
||||
|
||||
CFLAGS += -I. -O78 -Slibcontrib
|
||||
$(LIBTARGET):: lib$(LIB).r
|
||||
$(CATREZ) -d $@ lib$(LIB).r
|
||||
|
||||
$(LIB): $(OBJS) $(LIB).r
|
||||
$(RM) -f $@
|
||||
$(MAKELIB) $(MAKELIBFLAGS) -l $@ $(OBJS)
|
||||
$(CATREZ) -d $(LIB) $(LIB).r
|
||||
|
||||
release: $(LIB) $(HEADER)
|
||||
$(INSTALL) -d $(LIBDIR) $(INCDIR)
|
||||
$(INSTALL) $(LIB) $(LIBDIR)
|
||||
$(INSTALL) $(HEADER) $(INCDIR)
|
||||
|
||||
$(OBJS):: $(HEADER)
|
||||
$(OBJS):: contrib.h
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
#
|
||||
# Default 'release' and 'install' rules. These are intended for
|
||||
# use when building libraries.
|
||||
#
|
||||
# $Id: librelease.mk,v 1.1 1998/02/08 03:47:18 gdr-ftp Exp $
|
||||
#
|
||||
# Devin Reade, February 1998.
|
||||
#
|
||||
|
||||
# Select the appropriate destination directory.
|
||||
.IF $(USE_SLASH_LIB) != $(NULL)
|
||||
TARGET_DIR = $(LIBDIR)
|
||||
RELTARGET_DIR = $(RELLIB)
|
||||
.ELSE
|
||||
TARGET_DIR = $(USRLIBDIR)
|
||||
RELTARGET_DIR = $(RELUSRLIB)
|
||||
.END
|
||||
|
||||
# Place files where they will subsequently be archived in a binary
|
||||
# distribution.
|
||||
release: $(LIBTARGET)
|
||||
$(INSTALL) -d $(RELTARGET_DIR)
|
||||
$(INSTALL) $(LIBTARGET) $(RELTARGET_DIR)
|
||||
|
||||
# Install files into a live system.
|
||||
install: $(LIBTARGET)
|
||||
$(INSTALL) -d $(TARGET_DIR)
|
||||
$(INSTALL) $(LIBTARGET) $(TARGET_DIR)
|
|
@ -1,29 +1,14 @@
|
|||
#
|
||||
# This is the top-level makefile for libutil, GNO v2.0.6
|
||||
# This is the makefile for libutil, GNO v2.0.6
|
||||
#
|
||||
# $Id: Makefile,v 1.3 1997/10/03 04:47:34 gdr Exp $
|
||||
# $Id: Makefile,v 1.4 1998/02/08 03:47:34 gdr-ftp Exp $
|
||||
#
|
||||
|
||||
.INCLUDE: ../../paths.mk
|
||||
.INCLUDE: ../const.mk
|
||||
LIB = util
|
||||
SRCS = login.o logintty.o logwtmp.o
|
||||
OPTIMIZE = 78
|
||||
|
||||
LIB = libutil
|
||||
OBJS = login.o logintty.o logwtmp.o
|
||||
LIBDIR = /usr/lib
|
||||
.INCLUDE: /src/gno/lib/lib.mk
|
||||
|
||||
CFLAGS += -O78
|
||||
|
||||
build: $(LIB)
|
||||
|
||||
$(LIB): $(OBJS) libutil.r
|
||||
$(RM) -f $@
|
||||
$(MAKELIB) $(MAKELIBFLAGS) -l $@ $(OBJS)
|
||||
$(CATREZ) -d $@ libutil.r
|
||||
|
||||
install: $(LIB)
|
||||
$(INSTALL) -d $(LIBDIR)
|
||||
$(INSTALL) $(LIB) $(LIBDIR)
|
||||
|
||||
release: $(LIB)
|
||||
$(INSTALL) -d $(RELEASE_DIR)$(LIBDIR)
|
||||
$(INSTALL) $(LIB) $(RELEASE_DIR)$(LIBDIR)
|
||||
$(LIBTARGET):: lib$(LIB).r
|
||||
$(CATREZ) -d $@ lib$(LIB).r
|
||||
|
|
|
@ -1,29 +1,15 @@
|
|||
#
|
||||
# This is the top-level makefile for libutil, GNO v2.0.6
|
||||
# This is the makefile for liby, GNO v2.0.6
|
||||
#
|
||||
# $Id: Makefile,v 1.2 1997/10/03 04:46:02 gdr Exp $
|
||||
# $Id: Makefile,v 1.3 1998/02/08 03:47:40 gdr-ftp Exp $
|
||||
#
|
||||
|
||||
.INCLUDE: ../../paths.mk
|
||||
.INCLUDE: ../const.mk
|
||||
LIB = y
|
||||
SRCS = main.c yyerror.c
|
||||
OPTIMIZE = 78
|
||||
|
||||
LIB = liby
|
||||
OBJS = main.o yyerror.o
|
||||
LIBDIR = /usr/lib
|
||||
.INCLUDE: /src/gno/lib/lib.mk
|
||||
|
||||
CFLAGS += -O78
|
||||
$(LIBTARGET):: lib$(LIB).r
|
||||
$(CATREZ) -d $@ lib$(LIB).r
|
||||
|
||||
build: $(LIB)
|
||||
|
||||
$(LIB): $(OBJS) liby.r
|
||||
$(RM) -f $@
|
||||
$(MAKELIB) $(MAKELIBFLAGS) -l $@ $(OBJS)
|
||||
$(CATREZ) -d $@ liby.r
|
||||
|
||||
install: $(LIB)
|
||||
$(INSTALL) -d $(LIBDIR)
|
||||
$(INSTALL) $(LIB) $(LIBDIR)
|
||||
|
||||
release: $(LIB)
|
||||
$(INSTALL) -d $(RELEASE_DIR)$(LIBDIR)
|
||||
$(INSTALL) $(LIB) $(RELEASE_DIR)$(LIBDIR)
|
||||
|
|
Loading…
Reference in New Issue