From 4079986d8bd1f7c5130cdd5384c4a8b4554a496c Mon Sep 17 00:00:00 2001 From: taubert Date: Mon, 26 Jan 1998 05:49:05 +0000 Subject: [PATCH] Created lib.mk as a replacement for --- lib/lib.mk | 30 ++++++++++++++++++++++++++++++ lib/netdb/Makefile | 30 ++++++++++-------------------- 2 files changed, 40 insertions(+), 20 deletions(-) create mode 100644 lib/lib.mk diff --git a/lib/lib.mk b/lib/lib.mk new file mode 100644 index 0000000..553c9ad --- /dev/null +++ b/lib/lib.mk @@ -0,0 +1,30 @@ +# +# $Id: lib.mk,v 1.1 1998/01/26 05:49:01 taubert Exp $ +# + +.INCLUDE: /src/gno/paths.mk +.INCLUDE: /src/gno/lib/const.mk + +# Objects are source file names with .c changed to .o +OBJS= $(SRCS:s/.c/.o/:f) + +# +# Check for user-specified compile/load options +# + +# Was debugging requested? +.IF $(DEBUG) != $(NULL) + CFLAGS+= -G$(DEBUG) +.END + +# Was special optimizing requested? +.IF $(OPTIMIZE) == $(NULL) + OPTIMIZE= 78 +.END + +# Compile and load flags passed to occ +CFLAGS+= -O$(OPTIMIZE) + +# Update library with out of date object files +lib$(LIB): $(OBJS) + $(MAKELIB) $(MAKELIBFLAGS) -l $@ $^ diff --git a/lib/netdb/Makefile b/lib/netdb/Makefile index 4cc64d3..527e85b 100644 --- a/lib/netdb/Makefile +++ b/lib/netdb/Makefile @@ -1,27 +1,17 @@ # # Makefile for netdb # -# $Id: Makefile,v 1.1 1998/01/24 07:05:09 taubert Exp $ +# $Id: Makefile,v 1.2 1998/01/26 05:49:05 taubert Exp $ # -.INCLUDE: ../../paths.mk -.INCLUDE: ../const.mk +LIB= netdb +SRCS= rcmd.c getnetbyname.c getnetbyaddr.c getnetent.c getprotoname.c \ + getproto.c getprotoent.c getservbyname.c getservbyport.c \ + getservent.c gethostnamadr.c sethostent.c inet_addr.c inet_lnaof.c \ + inet_makeaddr.c inet_netof.c inet_network.c inet_ntoa.c res_comp.c \ + res_debug.c res_init.c res_mkquery.c res_query.c res_send.c \ + herror.c writev.c -OBJS= rcmd.o getnetbyname.o getnetbyaddr.o getnetent.o getprotoname.o \ - getproto.o getprotoent.o getservbyname.o getservbyport.o \ - getservent.o gethostnamadr.o sethostent.o inet_addr.o inet_lnaof.o \ - inet_makeaddr.o inet_netof.o inet_network.o inet_ntoa.o res_comp.o \ - res_debug.o res_init.o res_mkquery.o res_query.o res_send.o \ - herror.o writev.o - -CFLAGS +=-O79 - -libnetdb .PHONY: $(OBJS) - $(RM) $@ - $(MAKELIB) $(MAKELIBFLAGS) -l $@ $(OBJS) - -obj: $(OBJS) - -%.o: %.c - $(CC) -o $@ -c $(__OFLAG) $(CFLAGS) $< +OPTIMIZE=79 +.INCLUDE: /src/gno/lib/lib.mk