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 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
|
######################################################################
#
# Makefile for Info-ZIP's zip, zipcloak, zipnote, and zipsplit on AtheOS
#
# Copyright (C) 1999-2005 Info-ZIP
# Chris Herborth (chrish@pobox.com)
# Ruslan Nickolaev (nruslan@hotbox.ru)
#
######################################################################
# Things that don't change:
# Punish people who don't have SMP hardware.
MAKE = make -j 4 -f atheos/Makefile
SHELL = /bin/sh
LN = ln -s
RM = rm -f
BIND = $(CC)
AS = as
INSTALL = install
# Target directories
prefix = /usr
BINDIR = $(prefix)/bin
manext = 1
MANDIR = $(prefix)/man/man$(manext)
ZIPMANUAL = MANUAL
VERSION = Version 2.31 of __DATE__
######################################################################
CC:=gcc
CFLAGS:=-O3 -march=i586 -Wall -I. -DHAVE_DIRENT_H -DPASSWD_FROM_STDIN -DASMV -DASM_CRC
LFLAGS1:=
LFLAGS2:=
TARGET=$(ZIPS)
######################################################################
# Helpful targets
all:
$(MAKE) CC=$(CC) CFLAGS="$(CFLAGS)" \
LFLAGS1="$(LFLAGS1)" LFLAGS2="$(LFLAGS2)" \
$(TARGET)
######################################################################
# Object file lists and other build goodies
# Object file lists
OBJZ = zip.o zipfile.o zipup.o fileio.o util.o globals.o crypt.o ttyio.o \
atheos.o crctab.o
OBJI = deflate.o trees.o
OBJA = match.o crc_i386.o
OBJU = zipfile_.o fileio_.o util_.o globals.o atheos_.o
OBJN = zipnote.o $(OBJU)
OBJC = zipcloak.o $(OBJU) crctab.o crypt_.o ttyio.o
OBJS = zipsplit.o $(OBJU)
# Headers
ZIP_H = zip.h ziperr.h tailor.h atheos/osdep.h
# What to build?
ZIPS = zip zipnote zipsplit zipcloak
# suffix rules
.SUFFIXES:
.SUFFIXES: _.o .o .c .doc .1
.c_.o:
$(RM) $*_.c; $(LN) $< $*_.c
$(CC) -c $(CFLAGS) -DUTIL $*_.c
$(RM) $*_.c
.c.o:
$(CC) -c $(CFLAGS) $<
.1.doc:
groff -man -Tascii $< > $@
# rules for zip, zipnote, zipcloak, zipsplit, and the Zip MANUAL.
$(OBJZ): $(ZIP_H)
$(OBJI): $(ZIP_H)
$(OBJN): $(ZIP_H)
$(OBJS): $(ZIP_H)
$(OBJC): $(ZIP_H)
zip.o zipup.o crypt.o ttyio.o zipcloak.o crypt_.o: crypt.h
zip.o zipup.o zipnote.o zipcloak.o zipsplit.o: revision.h
zip.o crypt.o ttyio.o zipcloak.o crypt_.o: ttyio.h
zipup.o: atheos/zipup.h
match.o: match.S
$(CC) -E match.S > matchs.s
$(AS) -o $@ matchs.s
$(RM) matchs.s
crc_i386.o: crc_i386.S
$(CC) -E crc_i386.S > crc_i386s.s
$(AS) -o $@ crc_i386s.s
$(RM) crc_i386s.s
atheos.o: atheos/atheos.c
$(CC) -c $(CFLAGS) atheos/atheos.c
atheos_.o: atheos/atheos.c
$(RM) $*_.c; $(LN) atheos/atheos.c $*_.c
$(CC) -c $(CFLAGS) -DUTIL $*_.c
$(RM) $*_.c
zips: $(ZIPS)
zipsman: $(ZIPS) $(ZIPMANUAL)
zip: $(OBJZ) $(OBJI) $(OBJA)
$(BIND) -o zip $(LFLAGS1) $(OBJZ) $(OBJI) $(OBJA) $(LFLAGS2)
zipnote: $(OBJN)
$(BIND) -o zipnote $(LFLAGS1) $(OBJN) $(LFLAGS2)
zipcloak: $(OBJC)
$(BIND) -o zipcloak $(LFLAGS1) $(OBJC) $(LFLAGS2)
zipsplit: $(OBJS)
$(BIND) -o zipsplit $(LFLAGS1) $(OBJS) $(LFLAGS2)
$(ZIPMANUAL): man/zip.1
groff -man -Tascii man/zip.1 > $(ZIPMANUAL)
# install
install: $(ZIPS)
$(INSTALL) -m755 $(ZIPS) $(BINDIR)
mkdir -p $(MANDIR)
$(INSTALL) -m644 man/zip.1 $(MANDIR)/zip.$(manext)
uninstall:
-cd $(BINDIR); $(RM) $(ZIPS)
-cd $(MANDIR); $(RM) zip.$(manext)
dist: $(ZIPMANUAL)
zip -u9T zip`sed -e '/VERSION/!d' -e 's/.*"\(.*\)".*/\1/' \
-e s/[.]//g -e q revision.h` \
`awk '/^Makefile/,/vms_zip.rnh/ {print $$1}' < contents`
# clean up after making stuff and installing it
clean:
$(RM) *.o $(ZIPS) flags
# end of Makefile
|