ports/ftp/twoftpd/files/patch-Makefile
Marcelo Araujo f2e559d150 - Bump PORTREVISION to reflect devel/bglibs update.
- Take maintainership.
2017-03-26 04:56:50 +00:00

33 lines
1.1 KiB
Text

--- Makefile.orig 2015-02-04 21:59:50 UTC
+++ Makefile
@@ -23,11 +23,12 @@ clean: TARGETS
clean-spac: clean AUTOFILES
rm -f `cat AUTOFILES`
-compile: conf-cc
- ( echo '#!/bin/sh'; \
+compile: conf-cc conf-bgincs
+ ( bgincs=`head -n 1 conf-bgincs`; \
+ echo '#!/bin/sh'; \
echo 'source=$$1; shift'; \
echo 'base=`echo "$$source" | sed -e s:\\\\.c$$::`'; \
- echo exec `head -n 1 conf-cc` -I. '-o $${base}.o -c $$source $${1+"$$@"}'; \
+ echo exec `head -n 1 conf-cc` -I. "-I'$${bgincs}'" '-o $${base}.o -c $$source $${1+"$$@"}'; \
) >compile
chmod 755 compile
@@ -54,10 +55,11 @@ libraries: backend.a main.a
list.o: compile list.c twoftpd.h backend.h
./compile list.c
-load: conf-ld
- ( echo '#!/bin/sh';\
+load: conf-ld conf-bglibs
+ ( bglibs=`head -n 1 conf-bglibs`; \
+ echo '#!/bin/sh';\
echo 'main="$$1"; shift';\
- echo exec `head -n 1 conf-ld` -L. '-o "$$main" "$$main.o" $${1+"$$@"}'; \
+ echo exec `head -n 1 conf-ld` -L. "-L'$${bglibs}'" "-Wl,-R'$${bglibs}'" '-o "$$main" "$$main.o" $${1+"$$@"}'; \
) >load
chmod 755 load