aboutsummaryrefslogtreecommitdiff
path: root/sysutils/di/files/patch-Makefile
blob: 6ee7e6e2199d5979e1f6df538071e0c008c0e588 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
--- Makefile.orig	2010-05-11 01:55:01.000000000 -0400
+++ Makefile	2010-05-11 07:37:54.000000000 -0400
@@ -9,7 +9,7 @@
 SHELL = /bin/sh
 OBJ_EXT = .o
 EXE_EXT =
-CC = cc
+CC ?= cc
 MAKE = make
 
 #
@@ -31,7 +31,7 @@
 #
 # installation options
 #
-prefix = /usr/local
+prefix ?= /usr/local
 LOCALEDIR = $(prefix)/share/locale
 #
 INSTALL_DIR = $(prefix)
@@ -59,7 +59,7 @@
 #
 # simple man page installation
 #
-DI_MANINSTDIR = $(INSTALL_DIR)/share/man
+DI_MANINSTDIR = $(INSTALL_DIR)/man
 DI_MANDIR = $(DI_MANINSTDIR)/man1
 MAN_TARGET = $(PROG).1
 MANPERM = 644
@@ -180,7 +180,7 @@
 	$(MAKE) \
 		CC=cc LD=cc EXE_EXT="" OBJ_EXT=".o" \
 		CFLAGS="$(CFLAGS) -O" \
-		LDFLAGS="-O" di-programs
+		LDFLAGS="-O $(LDFLAGS)" di-programs
 
 bsd43-gcc:
 	@echo ':' > di.env;chmod a+rx di.env
@@ -190,7 +190,7 @@
 	$(MAKE) \
 		CC=gcc LD=gcc EXE_EXT="" OBJ_EXT=".o" \
 		CFLAGS="$(CFLAGS) -O2" \
-		LDFLAGS="-O2" di-programs
+		LDFLAGS="-O2 $(LDFLAGS)" di-programs
 
 ###
 # cleaning