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 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
## This file is formatted with a tab-width of 3
## See the README file for hints how to configure this Makefile.
CSOURCES = mcvert.c hqxify.c unpack.c
HSOURCES = mactypes.h
SOURCES = $(CSOURCES) $(HSOURCES) \
Makefile README README-conversion mcvert.idraw mcvert.1
MANIFEST = $(SOURCES) mcvert.man
OBJECTS = mcvert.o hqxify.o unpack.o $(XOBJ)
ALL = mcvert mcvert.man
EVERYTHING = $(ALL) tar mcvert.ps
CLEAN = $(OBJECTS) $(EVERYTHING)
VERSION=216
BIN = .
### Extra Objects
# common case
XOBJ=
### Bind Time Library Selection
# for most implementations
LIBS=
### Machine CFLAGS
CFLAGS_M= -DTIMEVAL -DULONG
### Byteorder(3n) [eg: htonl()] and Byte Manipulation [eg: bzero, bcopy] CFLAGS
# common case -- with support for both
CFLAGS_N =
### Debugging/Optimization CFLAGS
# debugging
CFLAGS_D = -g
# optimization
CFLAGS_D = -O3
### All CFLAGS
CFLAGS=$(CFLAGS_M) $(CFLAGS_N) $(CFLAGS_D) -DVERSION=$(VERSION)
### lint related
LINT=lint
LFLAGS=$(CFLAGS_M) $(CFLAGS_N) -DVERSION=$(VERSION)
all: $(ALL)
everything: $(EVERYTHING)
mcvert: $(OBJECTS)
$(CC) $(CFLAGS) $(OBJECTS) $(LIBS) -o $(BIN)/mcvert
lint: $(HSOURCES) $(CSOURCES)
$(LINT) $(LFLAGS) $(CSOURCES) | fgrep -vf lint-ignore
$(SOURCES):
sccs get $@
gettod.o:
ar -xv /usr/lib/libnet.a $@
$(OBJECTS): mactypes.h Makefile
tar : mcvert-$(VERSION).tar.gz
mcvert-$(VERSION).tar.gz : $(MANIFEST)
tar -czf $(MANIFEST) > $@
@nawk 'length($0) > 80 {exit(1)}' $@ || { make check_linelen; false; }
# we punt the issue of expanding tabs
check_linelen: $(MANIFEST)
@nawk 'length($0) >= 80 { printf "%s: %d: ", FILENAME, FNR; print }' \
$(MANIFEST)
clean:
rm -f $(CLEAN)
man: mcvert.man
mcvert.man: mcvert.1
nroff -man mcvert.1 | col | sed 's/.//g' | expand > $@
mcvert.ps: mcvert.1
groff -man mcvert.1 > $@
F=mcvert-$(VERSION).tar.gz
info:
@for todo in "ls -l" "head -3" "tail -3" sum wc; do \
echo $$todo $F; $$todo $F | sed 's/^/ /'; done
|