aboutsummaryrefslogtreecommitdiff
path: root/comms/ebook2cw/files/patch-Makefile
blob: e779293b3df0947c8b6d0c9eea93e11b6b38f7c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- Makefile.orig	2011-01-25 16:10:27.000000000 -0500
+++ Makefile	2011-02-10 19:41:06.000000000 -0500
@@ -1,19 +1,19 @@
 # ebook2cw Makefile -- Fabian Kurz, DJ1YFK -- http://fkurz.net/ham/ebook2cw.html
 
 VERSION=0.8.0
-DESTDIR ?= /usr
+DESTDIR ?= %%PREFIX%%
+CC	?= gcc
 
-all: ebook2cw
+all: ebook2cw cgi
 
 ebook2cw: ebook2cw.c codetables.h
-	gcc ebook2cw.c -pedantic -Wall -lm -lmp3lame -lvorbis -lvorbisenc -D DESTDIR=\"$(DESTDIR)\" -D VERSION=\"$(VERSION)\" -o ebook2cw
+	${CC} -I%%PREFIX%%/include -L%%PREFIX%%/lib ebook2cw.c -pedantic -Wall -lm -lmp3lame -lvorbis -lvorbisenc -D DESTDIR=\"$(DESTDIR)\" -D VERSION=\"$(VERSION)\" -o ebook2cw
 
 cgi: ebook2cw.c codetables.h
-	gcc -static ebook2cw.c -lvorbis -lvorbisenc -logg -lmp3lame -lm -D DESTDIR=\"$(DESTDIR)\" -D VERSION=\"$(VERSION)\" -D CGI -o cw.cgi
+	${CC} -I%%PREFIX%%/include -L%%PREFIX%%/lib -static ebook2cw.c -lvorbis -lvorbisenc -logg -lmp3lame -lm -D DESTDIR=\"$(DESTDIR)\" -D VERSION=\"$(VERSION)\" -D CGI -o cw.cgi
 
 static:
-	gcc -static ebook2cw.c -lvorbis -lvorbisenc -logg -lmp3lame -lm -D DESTDIR=\"$(DESTDIR)\" -D VERSION=\"$(VERSION)\" -o ebook2cw
-
+	${CC} -I%%PREFIX%% -L%%PREFIX%% -static ebook2cw.c -lvorbis -lvorbisenc -logg -lmp3lame -lm -D DESTDIR=\"$(DESTDIR)\" -D VERSION=\"$(VERSION)\" -o ebook2cw
 install:
 	install -d -v                      $(DESTDIR)/share/man/man1/
 	install -d -v                      $(DESTDIR)/bin/