| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
DPKG_EXPORT_BUILDFLAGS = 1 |
| 5 |
include /usr/share/dpkg/buildflags.mk |
| 6 |
|
| 7 |
DEBUGARGS = -g |
| 8 |
COMPILER = $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) |
| 9 |
CC_FOR_BUILD ?= $(CC) |
| 10 |
|
| 11 |
|
| 12 |
DESTDIR= |
| 13 |
BIN=$(DESTDIR)/usr/bin |
| 14 |
|
| 15 |
all : gpw loadtris |
| 16 |
echo gpw created, can delete loadtris |
| 17 |
|
| 18 |
gpw : gpw.o debian/randnum.o |
| 19 |
$(COMPILER) $(DEBUGARGS) -o gpw gpw.o debian/randnum.o |
| 20 |
|
| 21 |
trigram.h : loadtris |
| 22 |
./loadtris /usr/share/dict/words | sed "s/, }/}/" > trigram.h |
| 23 |
|
| 24 |
gpw.o : gpw.c trigram.h |
| 25 |
$(COMPILER) $(DEBUGARGS) -o gpw.o -c gpw.c |
| 26 |
|
| 27 |
loadtris : loadtris.o |
| 28 |
$(CC_FOR_BUILD) $(DEBUGARGS) -o loadtris loadtris.o |
| 29 |
|
| 30 |
loadtris.o : loadtris.c |
| 31 |
$(CC_FOR_BUILD) $(DEBUGARGS) -o loadtris.o -c loadtris.c |
| 32 |
|
| 33 |
debian/randnum.o: debian/randnum.c |
| 34 |
$(COMPILER) $(DEBUGARGS) -o debian/randnum.o -c debian/randnum.c |
| 35 |
|
| 36 |
clean : |
| 37 |
rm -f gpw loadtris loadtris.o gpw.o debian/randnum.o trigram.h |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
install: |
| 44 |
install -d $(DESTDIR) $(BIN) |
| 45 |
install -m 755 ./gpw $(BIN) |
| 46 |
|