forked from Lainports/opnsense-ports
50 lines
2 KiB
Text
50 lines
2 KiB
Text
--- Makefile.orig 2014-08-04 18:55:26 UTC
|
|
+++ Makefile
|
|
@@ -3,13 +3,13 @@
|
|
# compile for pentiumpro: make CFLAGS="-O2 -DNDEBUG -march=i586 -mcpu=pentiumpro -fomit-frame-pointer"
|
|
# create rpm with statically linked program: make rpm ADDLDFLAGS="-static -s -Wl,--gc-sections"
|
|
VERSION = 1.3.3
|
|
-PREFIX = /usr/local
|
|
-CC = gcc
|
|
+PREFIX ?= /usr/local
|
|
+CC ?= gcc
|
|
# using OPTFLAGS/OPTLDFLAGS for compatibilty with old scripts using this makefile
|
|
-OPTFLAGS = -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections
|
|
+OPTFLAGS = $(CFLAGS) -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections
|
|
OPTLDFLAGS =
|
|
-CFLAGS = $(OPTFLAGS)
|
|
-LDFLAGS = $(OPTLDFLAGS)
|
|
+#CFLAGS = $(OPTFLAGS)
|
|
+LDFLAGS += $(OPTLDFLAGS)
|
|
ADDCFLAGS =
|
|
ADDLDFLAGS =
|
|
ALLCFLAGS = -pipe $(CFLAGS) $(ADDCFLAGS) \
|
|
@@ -55,7 +55,7 @@ I18N_FILES = po/de.po po/en_AU.po po/es.
|
|
DIST_FILES = $(LIN_DIST_FILES) $(LIBRHASH_FILES) $(WIN_DIST_FILES) $(WIN_SRC_FILES) $(I18N_FILES)
|
|
DESTDIR =
|
|
BINDIR = $(PREFIX)/bin
|
|
-MANDIR = $(PREFIX)/share/man
|
|
+MANDIR = $(PREFIX)/man
|
|
LOCALEDIR = $(PREFIX)/share/locale
|
|
RPMTOP = rpms
|
|
RPMDIRS = SOURCES SPECS BUILD SRPMS RPMS
|
|
@@ -70,7 +70,7 @@ build-shared: $(SHARED_TRG)
|
|
lib-shared: $(SHAREDLIB)
|
|
lib-static: $(LIBRHASH)
|
|
|
|
-install: all install-binary install-data install-symlinks
|
|
+install: all install-binary install-lib-static install-lib-shared install-data install-symlinks
|
|
install-shared: $(SHARED_TRG) install-shared-binary install-data install-symlinks
|
|
install-data: install-man install-conf
|
|
uninstall: uninstall-binary uninstall-data uninstall-symlinks
|
|
@@ -105,8 +105,8 @@ install-man:
|
|
$(INSTALL_DATA) dist/rhash.1 $(DESTDIR)$(MANDIR)/man1/rhash.1
|
|
|
|
install-conf:
|
|
- $(INSTALL) -d $(DESTDIR)/etc
|
|
- sed -e 's/\x0D//g' dist/rhashrc.sample > rc.tmp && $(INSTALL_DATA) rc.tmp $(DESTDIR)/etc/rhashrc
|
|
+ $(INSTALL) -d $(DESTDIR)$(PREFIX)/etc
|
|
+ tr -d \\r < dist/rhashrc.sample > rc.tmp && $(INSTALL_DATA) rc.tmp $(DESTDIR)$(PREFIX)/etc/rhashrc.sample
|
|
rm -f rc.tmp
|
|
|
|
# dependencies should be properly set, otherwise 'make -j<n>' can fail
|