summaryrefslogtreecommitdiffstats
path: root/BeOS/ar-1.1/Makefile
blob: 8fb11ec023dc51c2cfe5dc7864623a7c93b55a32 (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
######################################################################
# Makefile for ar
#
# Dec. 14, 1997 Chris Herborth (chrish@kagi.com)
#
# $Id$
######################################################################

AR_VERSION=1.1

# Make variables
CC=mwcc
LD=mwcc

CFLAGS=-w9 -rostr -O3 -g
CFLAGS_O=-w9 -rostr -O7 -opt schedule604
LDFLAGS=-g -map ar.xMAP
LDFLAGS_O=

INSTALL=install -m 755

DESTINATION=/boot/home/config/bin

PARTS=main.o mwlib.o commands.o copy_attrs.o

all: ar

nodebug:
	-rm -f ar $(PARTS) ar.dbg ar.xSYM
	$(MAKE) CFLAGS="$(CFLAGS_O) -DNO_DEBUG" LDFLAGS="$(LDFLAGS_O)" ar

ar: $(PARTS)
	$(LD) $(LDFLAGS) -o $@ $(PARTS)

install: ar
	$(INSTALL) ar $(DESTINATION)
	ln -sf $(DESTINATION)/ar $(DESTINATION)/ar-posix

clean:
	-rm -f $(PARTS) ar ar.dbg ar.xSYM

zip:
	(cd .. ; zip -9ry ar-$(AR_VERSION).zip ar-$(AR_VERSION) \
		-x ar-$(AR_VERSION)/RCS -x ar-$(AR_VERSION)/docs/RCS \
		-x ar-$(AR_VERSION)/RCS/\* -x ar-$(AR_VERSION)/docs/RCS/\*)

%.o: %.c
	$(CC) $(CFLAGS) -c $< -o $@