1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00
freebsd-ports/math/sfst/files/patch-src-Makefile
2014-08-17 00:33:04 +00:00

81 lines
2.3 KiB
Plaintext

--- ./Makefile.orig 2012-01-10 04:13:14.000000000 -0500
+++ ./Makefile 2014-08-16 20:31:58.000000000 -0400
@@ -1,8 +1,8 @@
# try different definitions of SGILIB if hash_map is not found
#SGILIB=
-SGILIB=-DSGI__gnu_cxx
-#SGILIB=-DSGIext
+#SGILIB=-DSGI__gnu_cxx
+SGILIB=-DSGIext
# comment the following lines if readline is not found
READLINE = -DREADLINE
@@ -18,19 +18,19 @@
# Uncomment this line in order to compile a library and
# run "make clean" in order to force a recompilation of the object files
-# FPIC = -fPIC
+FPIC = -fPIC
-CXX = g++
+CXX ?= CC
WARNING = -Wall -Wcast-qual -Wconversion -std=c++98 -Wno-deprecated -ansi
ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN)
EXE = .exe
endif
-CC = g++
+CC ?= cc
CL = $(CC)
-CFLAGS = -O3 $(WARNING) $(SGILIB) $(CDT) $(READLINE) $(FPIC)
-LDFLAGS =
+CFLAGS += $(WARNING) $(SGILIB) $(CDT) $(READLINE) $(FPIC)
+#LDFLAGS =
CXXFLAGS = $(CFLAGS)
LXXFLAGS = $(LDFLAGS)
@@ -46,7 +46,7 @@
endif
DESTDIR =
-PREFIX = /usr/local/
+PREFIX ?= /usr/local/
PROGRAMS = fst-compiler$(EXE) fst-infl$(EXE) fst-generate$(EXE) fst-print$(EXE)\
fst-compare$(EXE) fst-compact$(EXE) fst-infl2$(EXE) fst-lowmem$(EXE)\
@@ -138,12 +138,12 @@
-rm $(ALLPROGRAMS) testprogram 2>&- > /dev/null
install: $(PROGRAMS)
- $(INSTALL_DIR) $(DESTDIR)$(PREFIX)bin
- for p in $(PROGRAMS); do $(INSTALL) $$p $(DESTDIR)$(PREFIX)bin/$$p; done
+ $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/bin
+ for p in $(PROGRAMS); do $(INSTALL) -s $$p $(DESTDIR)$(PREFIX)/bin/$$p; done
maninstall:
- $(INSTALL_DIR) $(DESTDIR)$(PREFIX)man/man1
- for m in man1/*.1; do $(INSTALL_MANPAGES) $$m $(DESTDIR)$(PREFIX)man/$$m; done
+ $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/man/man1
+ for m in man1/*.1; do $(INSTALL_MANPAGES) $$m $(DESTDIR)$(PREFIX)/man/$$m; done
ifeq ($(findstring arwin, $(shell uname)),arwin)
DYNLIBS = libsfst.dylib
@@ -154,12 +154,12 @@
libinstall: dynlib hfiles
dynlib: $(DYNLIBS)
- $(INSTALL_LIBS) $^ $(PREFIX)lib
+ $(INSTALL_LIBS) $^ $(DESTDIR)$(PREFIX)/lib
(ldconfig || true)
hfiles: alphabet.h basic.h fst.h interface.h mem.h sgi.h utf8.h
- -@if [ ! -d $(PREFIX)include/sfst ]; then mkdir -p $(PREFIX)include/sfst; fi
- $(INSTALL) $^ $(PREFIX)include/sfst
+ -@if [ ! -d $(DESTDIR)$(PREFIX)/include/sfst ]; then mkdir -p $(DESTDIR)$(PREFIX)/include/sfst; fi
+ $(INSTALL) $^ $(DESTDIR)$(PREFIX)/include/sfst
# DO NOT DELETE