mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-23 04:23:08 +00:00
cf6466fa4a
PR: 205212 Submitted by: tkato432@yahoo.com
69 lines
1.9 KiB
Plaintext
69 lines
1.9 KiB
Plaintext
--- Makefile.orig 2015-11-18 20:12:06 UTC
|
|
+++ Makefile
|
|
@@ -19,29 +19,30 @@
|
|
SHELL = /bin/sh
|
|
|
|
# Directories (private version)
|
|
-HOMEDIR = ../home
|
|
-INCDIR = ../home/p2c
|
|
-BINDIR = ..
|
|
-LIBDIR = ../home
|
|
-MANDIR = ../home
|
|
-MANFILE = p2c.cat # human-readable manual (for cat.1)
|
|
+#HOMEDIR = ../home
|
|
+#INCDIR = ../home/p2c
|
|
+#BINDIR = ..
|
|
+#LIBDIR = ../home
|
|
+#MANDIR = ../home
|
|
+#MANFILE = p2c.cat # human-readable manual (for cat.1)
|
|
#MANFILE = p2c.man.inst # uncompressed nroff source (for man.1)
|
|
#MANFILE = p2c.man.Z # compressed nroff source (for man.1.Z)
|
|
|
|
# Directories (public version)
|
|
-#HOMEDIR = /usr/lib/p2c
|
|
-#INCDIR = /usr/include/p2c
|
|
-#BINDIR = /usr/bin
|
|
-#LIBDIR = /usr/lib
|
|
-#MANDIR = /usr/man/man1
|
|
-#MANFILE = p2c.man.inst
|
|
+PREFIX ?= /usr/local
|
|
+HOMEDIR = $(PREFIX)/lib/p2c
|
|
+INCDIR = $(PREFIX)/include/p2c
|
|
+BINDIR = $(PREFIX)/bin
|
|
+LIBDIR = $(PREFIX)/lib
|
|
+MANDIR = $(PREFIX)/man/man1
|
|
+MANFILE = p2c.man.inst
|
|
|
|
# Compiler options
|
|
-CC = cc # you may wish to use gcc here instead
|
|
+CC ?= cc # you may wish to use gcc here instead
|
|
OPT = # -O # uncomment this for optimization
|
|
DEB = # -g # uncomment this for debugging
|
|
DEFS = -DTEST_MALLOC # place other -D types of things here # TDS 2015nov18
|
|
-CFLAGS = $(OPT) $(DEB) $(DEFS)
|
|
+CFLAGS += $(OPT) $(DEB) $(DEFS)
|
|
LFLAGS =
|
|
|
|
|
|
@@ -64,9 +65,9 @@ LIBSRCS = p2clib.c loc.p2clib.c
|
|
LIBOBJS = p2clib.o loc.p2clib.o
|
|
OTHERLIBOBJS =
|
|
|
|
-ABSHOMEDIR = `cd $(HOMEDIR); pwd`
|
|
-ABSINCDIR = `cd $(INCDIR); pwd`
|
|
-ABSLIBDIR = `cd $(LIBDIR); pwd`
|
|
+ABSHOMEDIR = $(HOMEDIR)
|
|
+ABSINCDIR = $(INCDIR)
|
|
+ABSLIBDIR = $(LIBDIR)
|
|
|
|
MISCSRCS = makeproto.c
|
|
PROTOS = p2c.proto p2c.hdrs
|
|
@@ -128,7 +129,6 @@ p2cc: p2cc.perl
|
|
sed -e "s;--HOMEDIR--;$(ABSHOMEDIR);" \
|
|
-e "s;--INCDIR--;$(ABSINCDIR);" \
|
|
-e "s;--LIBDIR--;$(ABSLIBDIR);" \
|
|
- -e "s;/bin/perl;`which perl`;" \
|
|
p2cc.perl >p2cc
|
|
chmod a+x p2cc
|
|
|