freebsd-ports/comms/ebook2cw/files/patch-Makefile

50 lines
1.5 KiB
Text
Raw Normal View History

--- Makefile.orig 2013-01-04 09:33:04.000000000 -0500
+++ Makefile 2013-01-16 10:16:50.000000000 -0500
@@ -3,37 +3,26 @@
# $Id: Makefile 547 2012-12-29 21:07:53Z dj1yfk $
VERSION=0.8.2
-DESTDIR ?= /usr
-
-# Set to NO to compile without Lame/Ogg-vorbis support
-USE_LAME?=YES
-USE_OGG?=YES
+DESTDIR ?= %%PREFIX%%
+CC ?= gcc
CFLAGS:=$(CFLAGS) -D DESTDIR=\"$(DESTDIR)\" -D VERSION=\"$(VERSION)\"
+CFLAGS+= -I%%LOCALBASE%%/include -D LAME -D OGGV
+LDFLAGS+= -L%%LOCALBASE%%/lib -lmp3lame -lvorbis -lvorbisenc -logg
-ifeq ($(USE_LAME), YES)
- CFLAGS:=$(CFLAGS) -D LAME
- LDFLAGS:=$(LDFLAGS) -lmp3lame
-endif
-ifeq ($(USE_OGG), YES)
- CFLAGS:=$(CFLAGS) -D OGGV
- LDFLAGS:=$(LDFLAGS) -lvorbis -lvorbisenc -logg
-endif
-
-
-all: ebook2cw
+all: ebook2cw cgi
ebook2cw: ebook2cw.c codetables.h
- gcc ebook2cw.c -pedantic -Wall -lm $(LDFLAGS) $(CFLAGS) -o ebook2cw
+ ${CC} ebook2cw.c -pedantic -Wall -lm $(LDFLAGS) $(CFLAGS) -o ebook2cw
cgi: ebook2cw.c codetables.h
- gcc -static ebook2cw.c $(LDFLAGS) -lm $(CFLAGS) -D CGI -o cw.cgi
+ ${CC} -static ebook2cw.c $(LDFLAGS) -lm $(CFLAGS) -D CGI -o cw.cgi
cgibuffered: ebook2cw.c codetables.h
- gcc -static ebook2cw.c $(LDFLAGS) -lm $(CFLAGS) -D CGI -D CGIBUFFERED -o cw.cgi
+ ${CC} -static ebook2cw.c $(LDFLAGS) -lm $(CFLAGS) -D CGI -D CGIBUFFERED -o cw.cgi
static:
- gcc -static ebook2cw.c $(LDFLAGS) -lm $(CFLAGS) -o ebook2cw
+ ${CC} -static ebook2cw.c $(LDFLAGS) -lm $(CFLAGS) -o ebook2cw
install:
install -d -v $(DESTDIR)/share/man/man1/