Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 1 | ###################################################################### |
| 2 | # Makefile for ar |
| 3 | # |
| 4 | # Dec. 14, 1997 Chris Herborth (chrish@kagi.com) |
| 5 | # |
| 6 | # $Id$ |
| 7 | ###################################################################### |
| 8 | |
| 9 | AR_VERSION=1.1 |
| 10 | |
| 11 | # Make variables |
| 12 | CC=mwcc |
| 13 | LD=mwcc |
| 14 | |
| 15 | CFLAGS=-w9 -rostr -O3 -g |
| 16 | CFLAGS_O=-w9 -rostr -O7 -opt schedule604 |
| 17 | LDFLAGS=-g -map ar.xMAP |
| 18 | LDFLAGS_O= |
| 19 | |
| 20 | INSTALL=install -m 755 |
| 21 | |
| 22 | DESTINATION=/boot/home/config/bin |
| 23 | |
| 24 | PARTS=main.o mwlib.o commands.o copy_attrs.o |
| 25 | |
| 26 | all: ar |
| 27 | |
| 28 | nodebug: |
| 29 | -rm -f ar $(PARTS) ar.dbg ar.xSYM |
| 30 | $(MAKE) CFLAGS="$(CFLAGS_O) -DNO_DEBUG" LDFLAGS="$(LDFLAGS_O)" ar |
| 31 | |
| 32 | ar: $(PARTS) |
| 33 | $(LD) $(LDFLAGS) -o $@ $(PARTS) |
| 34 | |
| 35 | install: ar |
| 36 | $(INSTALL) ar $(DESTINATION) |
| 37 | ln -sf $(DESTINATION)/ar $(DESTINATION)/ar-posix |
| 38 | |
| 39 | clean: |
| 40 | -rm -f $(PARTS) ar ar.dbg ar.xSYM |
| 41 | |
| 42 | zip: |
| 43 | (cd .. ; zip -9ry ar-$(AR_VERSION).zip ar-$(AR_VERSION) \ |
| 44 | -x ar-$(AR_VERSION)/RCS -x ar-$(AR_VERSION)/docs/RCS \ |
| 45 | -x ar-$(AR_VERSION)/RCS/\* -x ar-$(AR_VERSION)/docs/RCS/\*) |
| 46 | |
| 47 | %.o: %.c |
| 48 | $(CC) $(CFLAGS) -c $< -o $@ |