aboutsummaryrefslogtreecommitdiff
path: root/ksiders/Makefile
blob: 674b3e6ad60115db6f0d1dc8162c4411d18b9b24 (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

# 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

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

all: $(EXES)

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

install: all
	mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR) ;\
	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.1 > $(DESTDIR)$(MAN1DIR)/$$man.1.gz ;\
		else \
			cp $$man.1 $(DESTDIR)$(MAN1DIR) ; \
		fi ;\
	done
	if [ "$(GZIP_MAN)" = "y" ]; then \
		cd $(DESTDIR)$(MAN1DIR) && rm -f unmakatr.1.gz && ln -s makeatr.1.gz unmakatr.1.gz ;\
	else \
		cd $(DESTDIR)$(MAN1DIR) && rm -f unmakatr.1 && ln -s makeatr.1 unmakatr.1 ;\
	fi


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