Use ALL_TARGET/MAKE_ARGS

This commit is contained in:
Volker Stolz 2005-04-22 09:21:12 +00:00
parent 52a611c918
commit 5acd77daff
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=133921
2 changed files with 4 additions and 35 deletions

View file

@ -20,6 +20,10 @@ LIB_DEPENDS= forms.1:${PORTSDIR}/x11-toolkits/xforms
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}.src
USE_X_PREFIX= yes
ALL_TARGET= xrmftp
CFLAGS+= -I${X11BASE}/include -I${X11BASE}/include/X11
MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" \
LDFLAGS="-L/usr/lib -L${X11BASE}/lib -lm -lX11 -lforms -lXpm"
PORTDOCS= CHANGES FIXED-BUGS README
PLIST_FILES= bin/xrmftp

View file

@ -1,35 +0,0 @@
--- Makefile.orig Tue Nov 17 19:25:43 1998
+++ Makefile Mon Jul 1 01:56:44 2002
@@ -1,17 +1,24 @@
-CC=gcc
-XFORMSLIBPATH=/usr/X11R6/lib # path to xforms library
-XFORMSINCPATH=/usr/X11R6/include # path to xforms header file <forms.h>
-XLIBSPATH=/usr/X11R6/lib # path to standard X libraries
-XINCPATH=/usr/X11R6/include # path to standard X header files
-LIBS= -lm -lX11 -lforms # libraries
+X11BASE?=/usr/X11R6
+CC ?=gcc
+XFORMSLIBPATH=${X11BASE}/lib # path to xforms library
+.if exists (${X11BASE}/include/X11/forms.h)
+XFORMSINCPATH=${X11BASE}/include/X11
+.else
+XFORMSINCPATH=${X11BASE}/include
+.endif
+XLIBSPATH=${X11BASE}/lib # path to standard X libraries
+XINCPATH=${X11BASE}/include # path to standard X header files
+LIBS= -lm -lX11 -lforms -lXpm # libraries
#EXTRALIBS=-lnsl -lsocket # additional libraries needed by some unices
SRC=xftp.c fd_xftp.c
OBJ=$(SRC:.c=.o)
EXE=xrmftp
-CFLAGS=-I/usr/include -I${XFORMSINCPATH} -I${XINCPATH}
-LDFLAGS=-L/usr/lib -L${XLIBSPATH} ${LIBS} ${EXTRALIBS} -L${XFORMSLIBPATH} -O3
+CFLAGS +=-I/usr/include -I${XFORMSINCPATH} -I${XINCPATH}
+LDFLAGS =-L/usr/lib -L${XLIBSPATH} ${LIBS} ${EXTRALIBS} -L${XFORMSLIBPATH}
#------------------------------------------------------------------------------
+
+all: ${EXE}
${EXE}: ${OBJ}
${CC} ${LDFLAGS} -o ${EXE} ${OBJ}