Makefile clean-up; pass CFLAGS and LDFLAGS to Makefile -- fixes builds with -isysroot (e.g. Mac OS X)

This commit is contained in:
adam 2012-06-22 16:24:55 +00:00
parent ee0c5a53b8
commit 18962cb962
4 changed files with 30 additions and 21 deletions

View file

@ -1,8 +1,7 @@
# $NetBSD: Makefile,v 1.19 2011/09/04 21:20:06 dholland Exp $
#
# $NetBSD: Makefile,v 1.20 2012/06/22 16:24:55 adam Exp $
DISTNAME= toolame-02l
PKGREVISION= 3
PKGREVISION= 4
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=toolame/}
EXTRACT_SUFX= .tgz
@ -10,6 +9,7 @@ EXTRACT_SUFX= .tgz
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://sourceforge.net/projects/toolame/
COMMENT= Optimized MPEG 1/2 layer 2 audio encoder
LICENSE= gnu-lgpl-v2.1
PKG_DESTDIR_SUPPORT= user-destdir
@ -17,10 +17,10 @@ USE_TOOLS+= gmake
TOOLAME_ARCH?=
MAKE_ENV+= CC=${CC:Q} CFLAGS=${CFLAGS:M*:Q} ARCH=${TOOLAME_ARCH:Q}
MAKE_ENV+= CC=${CC:Q} CFLAGS=${CFLAGS:Q} LDFLAGS=${LDFLAGS:Q} ARCH=${TOOLAME_ARCH:Q}
BUILD_TARGET= toolame
INSTALLATION_DIRS= bin
INSTALLATION_DIRS= bin share/doc/toolame
.include "../../mk/bsd.prefs.mk"
@ -34,9 +34,8 @@ SUBST_SED.inline= -e 's,INLINE=inline,INLINE=,'
TOOLAME_HTMLFILES= changes.html default.html psycho.html readme.html vbr.html
do-install:
${INSTALL_DATA_DIR} ${DESTDIR:Q}${PREFIX:Q}/share/doc/html/toolame
cd ${WRKSRC:Q}/html; ${INSTALL_DATA} ${TOOLAME_HTMLFILES} \
${DESTDIR:Q}${PREFIX:Q}/share/doc/html/toolame
${INSTALL_PROGRAM} ${WRKSRC:Q}/toolame ${DESTDIR:Q}${PREFIX:Q}/bin
cd ${WRKSRC}/html; ${INSTALL_DATA} ${TOOLAME_HTMLFILES} \
${DESTDIR}${PREFIX}/share/doc/toolame
${INSTALL_PROGRAM} ${WRKSRC}/toolame ${DESTDIR}${PREFIX}/bin
.include "../../mk/bsd.pkg.mk"

View file

@ -1,7 +1,7 @@
@comment $NetBSD: PLIST,v 1.3 2009/06/14 17:32:23 joerg Exp $
@comment $NetBSD: PLIST,v 1.4 2012/06/22 16:24:55 adam Exp $
bin/toolame
share/doc/html/toolame/changes.html
share/doc/html/toolame/default.html
share/doc/html/toolame/psycho.html
share/doc/html/toolame/readme.html
share/doc/html/toolame/vbr.html
share/doc/toolame/changes.html
share/doc/toolame/default.html
share/doc/toolame/psycho.html
share/doc/toolame/readme.html
share/doc/toolame/vbr.html

View file

@ -1,9 +1,9 @@
$NetBSD: distinfo,v 1.7 2011/09/04 21:26:53 dholland Exp $
$NetBSD: distinfo,v 1.8 2012/06/22 16:24:55 adam Exp $
SHA1 (toolame-02l.tgz) = 9f58345ec5d552f49a9ad598e6eb2dc126cb10b4
RMD160 (toolame-02l.tgz) = 65ff0757f48080093df9e1932b5952199d03f5c6
Size (toolame-02l.tgz) = 127493 bytes
SHA1 (patch-aa) = 873031612d0f8bb7f41d49be647f24d73dc15384
SHA1 (patch-ab) = 97c2c56083f89ef0b999e692db4f38eb405cd3fb
SHA1 (patch-ac) = 35901599b52f09e6b50db7fde81d3332271eb0ef
SHA1 (patch-ac) = 19bb07ddc04eb8ad1a365fb1324fc1149a176926
SHA1 (patch-psycho__1_c) = c659e1f7c247d162e270565b9441ac6bd4e0aaaf

View file

@ -1,7 +1,7 @@
$NetBSD: patch-ac,v 1.3 2011/09/04 21:17:13 dholland Exp $
$NetBSD: patch-ac,v 1.4 2012/06/22 16:24:56 adam Exp $
- configure for pkgsrc
- INLINE should/must be blank based on how it's (inappropriately) used
configure for pkgsrc
INLINE should/must be blank based on how it's (inappropriately) used
--- Makefile.orig 2003-03-02 07:07:02.000000000 +0000
+++ Makefile
@ -20,7 +20,8 @@ $NetBSD: patch-ac,v 1.3 2011/09/04 21:17:13 dholland Exp $
+#PG = -fomit-frame-pointer
# Optimize flag. 3 is about as high as you can sanely go with GCC3.2.
OPTIM = -O3
-OPTIM = -O3
+OPTIM = $(CFLAGS)
# These flags are pretty much mandatory
-REQUIRED = -DNDEBUG -DINLINE=inline
@ -43,3 +44,12 @@ $NetBSD: patch-ac,v 1.3 2011/09/04 21:17:13 dholland Exp $
NEW_02L_FIXES = -DNEWENCODE -DNEWATAN
@@ -75,7 +75,7 @@ endif
$(CC) $(CC_SWITCHES) -c $< -o $@
$(PGM): $(OBJ) Makefile
- $(CC) $(PG) -o $(PGM) $(OBJ) $(LIBS)
+ $(CC) $(PG) -o $(PGM) $(OBJ) $(LDFLAGS) $(LIBS)
clean:
-rm $(OBJ) $(DEP)