aboutsummaryrefslogtreecommitdiff
path: root/ksiders/Makefile
blob: 38b33c76e28ea8dd26387cef1e68a7ef37e328ed (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70

# This Makefile has been tested with GNU make and /usr/ccs/bin/make
# on a Solaris 2.6 (SunOS 5.6) system.

CC=gcc
COPT=-O2
CFLAGS=-Wall $(COPT) -ansi -fpack-struct

# -pedantic complains about some perfectly harmless signed/unsigned
# char pointer stuff.

# Note: -fpack-struct works on gcc's at least as old as 2.95.3
# If you're not using gcc, find your compiler's equivalent option
# (/Zp on Microsoft compilers).

DESTDIR=
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/man
MAN1DIR=$(MANDIR)/man1

# some systems need this instead:
#MANDIR=$(PREFIX)/share/man

# Comment out next line if your system does not support gzip'ed man pages
GZIP_MAN=y

# Some distros have this with a .py extension, some don't. Only needed
# if you're rebuilding the man pages (users shouldn't have to).
# RST2MAN=rst2man.py
RST2MAN=rst2man

EXES=atrdir atrextr makeatr sortatr unmakatr
MANS=atrdir.1 atrextr.1 makeatr.1 sortatr.1 unmakatr.1

all: $(EXES) $(MANS)

%.1: %.rst manhdr.rst manftr.rst
	$(RST2MAN) $< > $@

clean:
	rm -f $(EXES) atr.o tags *~ *.bak

install: all
	mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MAN1DIR) ;\
	for exe in $(EXES) ; do \
		strip $$exe ;\
		cp $$exe $(DESTDIR)$(BINDIR)/$$exe ;\
	done ;\
	for man in $(MANS) ; do \
		if [ "$(GZIP_MAN)" = "y" ]; then \
			gzip -c < $$man > $(DESTDIR)$(MAN1DIR)/$$man.gz ;\
		else \
			cp $$man $(DESTDIR)$(MAN1DIR) ; \
		fi ;\
	done


atr.o: atr.c atr.h atdos.h kboot.h

atrdir: atrdir.c atr.o

atrextr: atrextr.c atr.o

makeatr: makeatr.c atr.o

sortatr: sortatr.c atr.o

unmakatr: unmakatr.c atr.o