- quiet down rm
- change from hard coded check for Alpha to using NO_SHARED_LIBS define - really use $(PREFIX) instead of hard coding it to /usr/local
This commit is contained in:
parent
d1bf09e7f7
commit
e1ceb1fdd9
@ -1,21 +1,22 @@
|
||||
# $OpenBSD: Makefile,v 1.9 1999/04/01 02:57:51 brad Exp $
|
||||
# $OpenBSD: Makefile,v 1.10 1999/06/19 05:26:53 brad Exp $
|
||||
|
||||
DISTNAME= gsm-1.0.10
|
||||
CATEGORIES= audio
|
||||
MASTER_SITES= ftp://ftp.cs.tu-berlin.de/pub/local/kbs/tubmik/gsm/
|
||||
|
||||
NEED_VERSION= 1.64
|
||||
|
||||
MAINTAINER= angelos@openbsd.org
|
||||
|
||||
MASTER_SITES= ftp://ftp.cs.tu-berlin.de/pub/local/kbs/tubmik/gsm/
|
||||
|
||||
WRKSRC= ${WRKDIR}/gsm-1.0-pl10
|
||||
|
||||
post-install:
|
||||
.if !defined(NO_INSTALL_MANPAGES)
|
||||
${LN} -sf ${PREFIX}/man/man1/toast.1 ${PREFIX}/man/man1/untoast.1
|
||||
${LN} -sf ${PREFIX}/man/man1/toast.1 ${PREFIX}/man/man1/tcat.1
|
||||
.endif
|
||||
${LDCONFIG} -m ${PREFIX}/lib
|
||||
@${LN} -sf ${PREFIX}/man/man1/toast.1 ${PREFIX}/man/man1/untoast.1
|
||||
@${LN} -sf ${PREFIX}/man/man1/toast.1 ${PREFIX}/man/man1/tcat.1
|
||||
@${LDCONFIG} -m ${PREFIX}/lib
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
.if defined(NO_SHARED_LIBS)
|
||||
MAKE_ENV+= NO_SHARED_LIBS=yes
|
||||
.endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- Makefile.orig Tue Jul 2 07:36:06 1996
|
||||
+++ Makefile Thu Feb 26 12:11:00 1998
|
||||
--- Makefile.orig Tue Jul 2 10:36:06 1996
|
||||
+++ Makefile Sat Jun 19 01:01:18 1999
|
||||
@@ -7,11 +7,13 @@
|
||||
SASR = -DSASR
|
||||
######### Define SASR if >> is a signed arithmetic shift (-1 >> 1 == -1)
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
LD = $(CC)
|
||||
|
||||
@@ -59,11 +61,13 @@
|
||||
@@ -59,19 +61,19 @@
|
||||
######### Includes needed by $(CC)
|
||||
|
||||
# LDINC = -L/usr/gnu/lib/gcc-2.1/gcc-lib/sparc-sun-sunos4.1.2/2.1
|
||||
@ -37,11 +37,10 @@
|
||||
# LDLIB = -lgcc
|
||||
######### Additional libraries needed by $(LD)
|
||||
|
||||
+PREFIX= /usr/local
|
||||
|
||||
-
|
||||
# Where do you want to install libraries, binaries, a header file
|
||||
# and the manual pages?
|
||||
@@ -71,7 +75,7 @@
|
||||
#
|
||||
# Leave INSTALL_ROOT empty (or just don't execute "make install") to
|
||||
# not install gsm and toast outside of this directory.
|
||||
|
||||
@ -50,7 +49,7 @@
|
||||
|
||||
# Where do you want to install the gsm library, header file, and manpages?
|
||||
#
|
||||
@@ -80,7 +84,7 @@
|
||||
@@ -80,7 +82,7 @@
|
||||
|
||||
GSM_INSTALL_ROOT = $(INSTALL_ROOT)
|
||||
GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/lib
|
||||
@ -59,7 +58,15 @@
|
||||
GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3
|
||||
|
||||
|
||||
@@ -129,18 +133,25 @@
|
||||
@@ -106,6 +108,7 @@
|
||||
COMPRESSFLAGS =
|
||||
# RANLIB = true
|
||||
RANLIB = ranlib
|
||||
+RM = rm -f
|
||||
|
||||
#
|
||||
# You shouldn't have to configure below this line if you're porting.
|
||||
@@ -129,18 +132,25 @@
|
||||
# DEBUG = -DNDEBUG
|
||||
######### Remove -DNDEBUG to enable assertions.
|
||||
|
||||
@ -77,7 +84,7 @@
|
||||
|
||||
LIBGSM = $(LIB)/libgsm.a
|
||||
-
|
||||
+.if (${MACHINE_ARCH} == "alpha")
|
||||
+.if defined(NO_SHARED_LIBS)
|
||||
+LIBGSMSO =
|
||||
+INSTALLED_LIBGSMSO =
|
||||
+.else
|
||||
@ -87,7 +94,7 @@
|
||||
TOAST = $(BIN)/toast
|
||||
UNTOAST = $(BIN)/untoast
|
||||
TCAT = $(BIN)/tcat
|
||||
@@ -258,6 +269,7 @@
|
||||
@@ -258,6 +268,7 @@
|
||||
|
||||
GSM_INSTALL_TARGETS = \
|
||||
$(GSM_INSTALL_LIB)/libgsm.a \
|
||||
@ -95,7 +102,7 @@
|
||||
$(GSM_INSTALL_INC)/gsm.h \
|
||||
$(GSM_INSTALL_MAN)/gsm.3 \
|
||||
$(GSM_INSTALL_MAN)/gsm_explode.3 \
|
||||
@@ -277,9 +289,12 @@
|
||||
@@ -277,9 +288,12 @@
|
||||
$(CC) $(CFLAGS) $?
|
||||
@-mv `$(BASENAME) $@` $@ > /dev/null 2>&1
|
||||
|
||||
@ -105,21 +112,24 @@
|
||||
# Target rules
|
||||
|
||||
-all: $(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST)
|
||||
+all: $(LIBGSM) $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST)
|
||||
+all: $(LIBGSM) $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST)
|
||||
@-echo $(ROOT): Done.
|
||||
|
||||
tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result
|
||||
@@ -299,6 +314,9 @@
|
||||
@@ -299,8 +313,11 @@
|
||||
|
||||
# The basic API: libgsm
|
||||
|
||||
+$(LIBGSMSO): $(LIB) $(GSM_OBJECTS:S/o$/so/g)
|
||||
+ ld -Bshareable -o $@ $(GSM_OBJECTS:S/o$/so/g)
|
||||
+ ld -Bshareable -Bforcearchive -o $@ $(GSM_OBJECTS:S/o$/so/g)
|
||||
+
|
||||
$(LIBGSM): $(LIB) $(GSM_OBJECTS)
|
||||
-rm $(RMFLAGS) $(LIBGSM)
|
||||
- -rm $(RMFLAGS) $(LIBGSM)
|
||||
+ $(RM) $(RMFLAGS) $(LIBGSM)
|
||||
$(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
|
||||
@@ -308,7 +326,7 @@
|
||||
$(RANLIB) $(LIBGSM)
|
||||
|
||||
@@ -308,14 +325,14 @@
|
||||
# Toast, Untoast and Tcat -- the compress-like frontends to gsm.
|
||||
|
||||
$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM)
|
||||
@ -127,17 +137,111 @@
|
||||
+ $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) -lgsm $(LDLIB)
|
||||
|
||||
$(UNTOAST): $(BIN) $(TOAST)
|
||||
-rm $(RMFLAGS) $(UNTOAST)
|
||||
@@ -394,6 +412,12 @@
|
||||
- -rm $(RMFLAGS) $(UNTOAST)
|
||||
+ $(RM) $(RMFLAGS) $(UNTOAST)
|
||||
$(LN) $(TOAST) $(UNTOAST)
|
||||
|
||||
$(TCAT): $(BIN) $(TOAST)
|
||||
- -rm $(RMFLAGS) $(TCAT)
|
||||
+ $(RM) $(RMFLAGS) $(TCAT)
|
||||
$(LN) $(TOAST) $(TCAT)
|
||||
|
||||
|
||||
@@ -342,59 +359,65 @@
|
||||
|
||||
gsmuninstall:
|
||||
-if [ x"$(GSM_INSTALL_ROOT)" != x ] ; then \
|
||||
- rm $(RMFLAGS) $(GSM_INSTALL_TARGETS) ; \
|
||||
+ $(RM) $(RMFLAGS) $(GSM_INSTALL_TARGETS) ; \
|
||||
fi
|
||||
|
||||
toastuninstall:
|
||||
-if [ x"$(TOAST_INSTALL_ROOT)" != x ] ; then \
|
||||
- rm $(RMFLAGS) $(TOAST_INSTALL_TARGETS); \
|
||||
+ $(RM) $(RMFLAGS) $(TOAST_INSTALL_TARGETS); \
|
||||
fi
|
||||
|
||||
$(TOAST_INSTALL_BIN)/toast: $(TOAST)
|
||||
- -rm $@
|
||||
+ $(RM) $@
|
||||
cp $(TOAST) $@
|
||||
chmod 755 $@
|
||||
|
||||
$(TOAST_INSTALL_BIN)/untoast: $(TOAST_INSTALL_BIN)/toast
|
||||
- -rm $@
|
||||
+ $(RM) $@
|
||||
ln $? $@
|
||||
|
||||
$(TOAST_INSTALL_BIN)/tcat: $(TOAST_INSTALL_BIN)/toast
|
||||
- -rm $@
|
||||
+ $(RM) $@
|
||||
ln $? $@
|
||||
|
||||
$(TOAST_INSTALL_MAN)/toast.1: $(MAN)/toast.1
|
||||
- -rm $@
|
||||
+ $(RM) $@
|
||||
cp $? $@
|
||||
chmod 444 $@
|
||||
|
||||
$(GSM_INSTALL_MAN)/gsm.3: $(MAN)/gsm.3
|
||||
- -rm $@
|
||||
+ $(RM) $@
|
||||
cp $? $@
|
||||
chmod 444 $@
|
||||
|
||||
$(GSM_INSTALL_MAN)/gsm_option.3: $(MAN)/gsm_option.3
|
||||
- -rm $@
|
||||
+ $(RM) $@
|
||||
cp $? $@
|
||||
chmod 444 $@
|
||||
|
||||
$(GSM_INSTALL_MAN)/gsm_explode.3: $(MAN)/gsm_explode.3
|
||||
- -rm $@
|
||||
+ $(RM) $@
|
||||
cp $? $@
|
||||
chmod 444 $@
|
||||
|
||||
$(GSM_INSTALL_MAN)/gsm_print.3: $(MAN)/gsm_print.3
|
||||
- -rm $@
|
||||
+ $(RM) $@
|
||||
cp $? $@
|
||||
chmod 444 $@
|
||||
|
||||
$(GSM_INSTALL_INC)/gsm.h: $(INC)/gsm.h
|
||||
- -rm $@
|
||||
+ $(RM) $@
|
||||
cp $? $@
|
||||
chmod 444 $@
|
||||
|
||||
$(GSM_INSTALL_LIB)/libgsm.a: $(LIBGSM)
|
||||
+ -rm $@
|
||||
- -rm $@
|
||||
+ $(RM) $@
|
||||
+ cp $? $@
|
||||
+ chmod 444 $@
|
||||
+ ranlib $@
|
||||
+ $(RANLIB) $@
|
||||
+
|
||||
+$(INSTALLED_LIBGSMSO): $(LIBGSMSO)
|
||||
-rm $@
|
||||
+ $(RM) $@
|
||||
cp $? $@
|
||||
chmod 444 $@
|
||||
|
||||
@@ -416,16 +439,16 @@
|
||||
@-echo uninstall: Done.
|
||||
|
||||
semi-clean:
|
||||
- -rm $(RMFLAGS) */*.o \
|
||||
+ $(RM) $(RMFLAGS) */*.o \
|
||||
$(TST)/lin2cod $(TST)/lin2txt \
|
||||
$(TST)/cod2lin $(TST)/cod2txt \
|
||||
$(TST)/gsm2cod \
|
||||
$(TST)/*.*.*
|
||||
-$(FIND) . \( -name core -o -name foo \) \
|
||||
- -print | xargs rm $(RMFLAGS)
|
||||
+ -print | xargs $(RM) $(RMFLAGS)
|
||||
|
||||
clean: semi-clean
|
||||
- -rm $(RMFLAGS) $(LIBGSM) $(ADDTST)/add \
|
||||
+ $(RM) $(RMFLAGS) $(LIBGSM) $(ADDTST)/add \
|
||||
$(TOAST) $(TCAT) $(UNTOAST) \
|
||||
$(ROOT)/gsm-1.0.tar.Z
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user