xref: /plan9/sys/src/cmd/unix/u9fs/makefile (revision 63dc73a944c11c08369d1962de79e66e17ab23ee)
1#
2# The goal is to keep as much per-system stuff autodetected in plan9.h
3# as possible.  Still, sometimes you can't help it.  Look for your system.
4#
5
6# SGI
7#
8# To correctly handle 64-bit files and offsets, add -64 to CFLAGS and LDFLAGS
9# On Irix 5.X, add -DIRIX5X to hack around their own #include problems (see plan9.h).
10#
11# SunOS
12#
13# SunOS 5.5.1 does not provide inttypes.h; add -lsunos to CFLAGS and
14# change CC and LD to gcc.  Add -lsocket, -lnsl to LDTAIL.
15# If you need <inttypes.h> copy sun-inttypes.h to inttypes.h.
16#
17#CC=cc
18CFLAGS=-g -I.
19LD=cc
20LDFLAGS=
21LDTAIL=
22
23OFILES=\
24	authnone.o\
25	authrhosts.o\
26	authp9any.o\
27	convD2M.o\
28	convM2D.o\
29	convM2S.o\
30	convS2M.o\
31	des.o\
32	dirmodeconv.o\
33	doprint.o\
34	fcallconv.o\
35	oldfcall.o\
36	print.o\
37	random.o\
38	readn.o\
39	remotehost.o\
40	rune.o\
41	safecpy.o\
42	strecpy.o\
43	tokenize.o\
44	u9fs.o\
45	utfrune.o
46
47HFILES=\
48	fcall.h\
49	plan9.h
50
51u9fs: $(OFILES)
52	$(LD) $(LDFLAGS) -o u9fs $(OFILES) $(LDTAIL)
53
54%.o: %.c $(HFILES)
55	$(CC) $(CFLAGS) -c $*.c
56
57clean:
58	rm -f *.o u9fs
59
60install: u9fs
61	cp u9fs ../../bin
62
63.PHONY: clean install
64