Merge branch 'vendor/GREP'
[dragonfly.git] / bin / cpdup / Makefile.sun
1 #
2 #   Makefile for Solaris, using the Sun Studio compiler.
3 #   To compile, type this command:
4 #
5 #       make -f Makefile.sun
6 #
7 #   To compile without MD5 support:
8 #
9 #       make -f Makefile.sun NOMD5=yes
10 #
11 #   Notes:
12 #    -- There is no "install" target.  Just copy the cpdup
13 #       binary wherever you want.
14 #    -- The cpdup.1 manual page uses BSD mdoc syntax which
15 #       doesn't work on Solaris.  It is suggested that you
16 #       create a catpage on a BSD machine like this:
17 #           nroff -man cpdup.1 > cpdup.txt
18 #       and then view that catpage with "more cpdup.txt"
19 #       on Solaris.
20 #
21
22
23 PROG=   cpdup
24 SRCS=   cpdup.c hcproto.c hclink.c misc.c fsmid.c compat_sun.c
25
26 DEFSMD5:sh =    test -n "${NOMD5}" && echo -DNOMD5; true
27 LIBSMD5:sh =    test -z "${NOMD5}" && echo -lmd5; true
28 SRCSMD5:sh =    test -z "${NOMD5}" && echo md5.c; true
29 SRCS += $(SRCSMD5)
30
31 OBJS=$(SRCS:%.c=%.o)
32
33 CC=cc
34 CFLAGS=-xO5 -v -D_LARGEFILE64_SOURCE $(DEFSMD5)
35 #   Note:  Do not use "-fast" because it makes errno unreliable
36 #   and breaks certain aliasing and alignment assumptions!
37
38 $(PROG): $(OBJS)
39         $(CC) $(CFLAGS) $(LIBSMD5) $(OBJS) -o $(PROG)
40
41 clean:
42         rm -f $(PROG) $(OBJS)
43
44 MAKEFILE=Makefile.sun
45 DEPMARK=Everything below is generated by "make -f $(MAKEFILE) depend"
46
47 depend:
48         (sed '/^# *$(DEPMARK)$$/,$$d' $(MAKEFILE) ; \
49         echo '# $(DEPMARK)'; \
50         $(CC) $(CFLAGS) -xM1 $(SRCS) ) > $(MAKEFILE).new
51         mv -f $(MAKEFILE).new $(MAKEFILE)
52
53 # Everything below is generated by "make -f Makefile.sun depend"
54 cpdup.o: cpdup.c
55 cpdup.o: cpdup.h
56 cpdup.o: compat_sun.h
57 cpdup.o: hclink.h
58 cpdup.o: hcproto.h
59 hcproto.o: hcproto.c
60 hcproto.o: cpdup.h
61 hcproto.o: compat_sun.h
62 hcproto.o: hclink.h
63 hcproto.o: hcproto.h
64 hclink.o: hclink.c
65 hclink.o: cpdup.h
66 hclink.o: compat_sun.h
67 hclink.o: hclink.h
68 hclink.o: hcproto.h
69 misc.o: misc.c
70 misc.o: cpdup.h
71 misc.o: compat_sun.h
72 fsmid.o: fsmid.c
73 fsmid.o: cpdup.h
74 fsmid.o: compat_sun.h
75 compat_sun.o: compat_sun.c
76 compat_sun.o: compat_sun.h
77 md5.o: md5.c
78 md5.o: cpdup.h
79 md5.o: compat_sun.h