summaryrefslogtreecommitdiff
path: root/community/lout/makefile.arch
blob: e0cb633229f65954b3960121fc25b1630a46a168 (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Makefile for lout 3.38 on Arch Linux.
# catwell <catwell@archlinux.us>

PKGDIR = /
COPTS = -ansi -pedantic -O3

CFLAGS = -DOS_UNIX=1 -DOS_DOS=0 -DOS_MAC=0 -DDB_FIX=0 -DUSE_STAT=1 \
  -DSAFE_DFT=0 -DCOLLATE=1 -DLIB_DIR=\"/usr/lib/lout\" -DFONT_DIR=\"font\" \
  -DMAPS_DIR=\"maps\" -DINCL_DIR=\"include\" -DDATA_DIR=\"data\" -DHYPH_DIR=\"hyph\" \
  -DLOCALE_DIR=\"locale\" -DCHAR_IN=1 -DCHAR_OUT=0 -DLOCALE_ON=0 \
  -DASSERT_ON=1 $(COPTS) -DDEBUG_ON=0 -DPDF_COMPRESSION=1 -I/usr/lib/

OBJS = z01.o z02.o z03.o z04.o z05.o z06.o z07.o z08.o \
  z09.o z10.o z11.o z12.o z13.o z14.o z15.o z16.o \
  z17.o z18.o z19.o z20.o z21.o z22.o z23.o z24.o \
  z25.o z26.o z27.o z28.o z29.o z30.o z31.o z32.o \
  z33.o z34.o z35.o z36.o z37.o z38.o z39.o z40.o \
  z41.o z42.o z43.o z44.o z45.o z46.o z47.o z48.o \
  z49.o z50.o z51.o z52.o

arch: $(OBJS)
	gcc -o lout $(OBJS) /usr/lib/libz.a -lm
	gcc -o prg2lout prg2lout.c

$(OBJS): externs.h

externs.h:

install: arch
	# lout
	install -Dm0755 lout $(PKGDIR)/usr/bin/lout
	set include data hyph font maps; \
	for i; do \
	  install -d $(PKGDIR)/usr/lib/lout/$$i; \
	  install -m0644 -t $(PKGDIR)/usr/lib/lout/$$i/ $$i/*; \
	done
	# prg2lout
	install -Dm0755 prg2lout $(PKGDIR)/usr/bin/prg2lout
	# man
	sed -i -e "s@<BINDIR>@/usr/bin@" -e "s@<LIBDIR>@/usr/lib/lout@" \
	  -e "s@<LOUTDOCDIR>@/usr/doc/lout@" -e "s@<MANDIR>@/usr/share/man/man1@" \
	man/lout.1
	install -Dm0644 man/lout.1 $(PKGDIR)/usr/share/man/man1/lout.1
	install -Dm0644 man/prg2lout.1 $(PKGDIR)/usr/share/man/man1/prg2lout.1