summaryrefslogtreecommitdiff
path: root/ar/Makefile
blob: 490a1f688cea9a82fc209f95fa092f0b4ec44803 (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
# Copyright (c) 1999 Greg Haerr <greg@censoft.com>
# This file is part of the Linux-8086 Development environment and is
# distributed under the GNU General Public License.

LIBDIR	=/usr/bin
CFLAGS	=-O
LDFLAGS	=
DEFS	=
OBJS= ar.o alloca.o

all: ar86

ar86: $(OBJS)
	$(CC) $(LDFLAGS) $(OBJS) -o $@

install: ar86
	install -d $(LIBDIR)
	install -m 755 ar86 $(LIBDIR)

clean realclean clobber:
	rm -f *.o ar86 ar ar.h rel_aout.h

$(OBJS): ar.h rel_aout.h

ar.h:
	test -f ar.h || \
	{ rm -f ar.h ; ln -s ../libc/include/ar.h . ; } || \
	ln ../libc/include/ar.h .

rel_aout.h:
	test -f rel_aout.h || \
	{ rm -f rel_aout.h ; ln -s ../ld/rel_aout.h . ; } || \
	ln ../ld/rel_aout.h .

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