respect CC/CFLAGS

This commit is contained in:
wilfried 2001-03-17 14:53:36 +00:00
parent 553c528094
commit 71aaa4e6e2
4 changed files with 95 additions and 0 deletions

View File

@ -0,0 +1,39 @@
$OpenBSD: patch-Makefile_sun,v 1.1 2001/03/17 14:53:36 wilfried Exp $
--- Makefile.sun.orig Sat Mar 17 15:50:50 2001
+++ Makefile.sun Sat Mar 17 15:52:11 2001
@@ -1,28 +1,23 @@
OBJS = btoa.o atob.o repair.o
-DESTDIR ?= /usr/local
-
all: btoa
btoa: $(OBJS)
- cc -O $(OBJS) -o btoa
+ ${CC} -O $(OBJS) -o btoa
btoa.o: btoa.c btoa.h chksum.h
- cc -c -O btoa.c
+ ${CC} -c ${CFLAGS} btoa.c
atob.o: atob.c btoa.h chksum.h
- cc -c -O atob.c
+ ${CC} -c ${CFLAGS} atob.c
repair.o: repair.c btoa.h
- cc -c -O repair.c
+ ${CC} -c ${CFLAGS} repair.c
install: btoa btoa.1
- -@mkdir -p $(DESTDIR)/bin
- install -c -s -m 755 btoa $(DESTDIR)/bin/btoa
- rm -f $(DESTDIR)/bin/atob
- ln $(DESTDIR)/bin/btoa $(DESTDIR)/bin/atob
- -@mkdir -p $(DESTDIR)/man/man1
- install -c -m 644 btoa.1 $(DESTDIR)/man/man1/btoa.1
+ ${BSD_INSTALL_PROGRAM} btoa $(PREFIX)/bin/
+ ln $(PREFIX)/bin/btoa $(PREFIX)/bin/atob
+ ${BSD_INSTALL_MAN} btoa.1 $(PREFIX)/man/man1/
clean:
rm -f btoa $(OBJS)

View File

@ -0,0 +1,25 @@
$OpenBSD: patch-Makefile,v 1.1 2001/03/17 14:57:21 wilfried Exp $
--- Makefile.orig Wed Mar 18 02:02:29 1998
+++ Makefile Fri Mar 16 19:35:18 2001
@@ -49,7 +49,7 @@ WORDDIR=/usr/local/lib
# Name of the default wordfile
WORDFILE=-DWORDFILE=\"$(WORDDIR)/words\"
# C compiler
-CC=cc
+#CC=cc
# Optimization or other flags for C compiler
CCFLAGS=-O
#CCFLAGS=-g
@@ -65,10 +65,10 @@ dist: agm-1.3.1.tar.gz
doc: agm.ps
agm: main.o process.o listfuncs.o wordfuncs.o gobble.o sort.o output.o progress.o
- $(CC) $(CCFLAGS) $(DEFINES) $(RELEASE) $(WORDFILE) -o agm main.o process.o listfuncs.o wordfuncs.o gobble.o sort.o output.o progress.o
+ $(CC) $(CFLAGS) $(DEFINES) $(RELEASE) $(WORDFILE) -o agm main.o process.o listfuncs.o wordfuncs.o gobble.o sort.o output.o progress.o
.c.o:
- $(CC) -c $(CCFLAGS) $(DEFINES) $(RELEASE) $(WORDFILE) $<
+ $(CC) -c $(CFLAGS) $(DEFINES) $(RELEASE) $(WORDFILE) $<
main.o: main.c agm.h

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-Makefile,v 1.1 2001/03/17 14:58:41 wilfried Exp $
--- Makefile.orig Mon Sep 30 05:57:36 1996
+++ Makefile Fri Mar 16 19:37:18 2001
@@ -27,14 +27,14 @@ MANDIR=/usr/man/man6
# Note that if you change CC here you must also change it in ./lib/Makefile
-CC=gcc
+#CC=gcc
# if using a compiler which adheres strictly to ANSI C guidelines then
# uncomment the next line.
#DEFS=-DFORCE_ANSI
-CFLAGS=-O -I $(LIBDIR) $(DEFS)
+CFLAGS+= -I $(LIBDIR) $(DEFS)
# Nothing should need changing below here

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-lib_Makefile,v 1.1 2001/03/17 14:58:41 wilfried Exp $
--- lib/Makefile.orig Mon Sep 30 05:57:36 1996
+++ lib/Makefile Fri Mar 16 19:37:49 2001
@@ -22,7 +22,5 @@
#Note may need to change this for your system, the only reason this Makefile
#exists is because the non-gnu make on suns is brain dead.
-CC=gcc
-CFLAGS=-O
all: getopt.o getopt1.o