2 # Makefile for Solaris, using the Sun Studio compiler.
3 # To compile, type this command:
7 # To compile without MD5 support:
9 # make -f Makefile.sun NOMD5=yes
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"
24 SRCS= cpdup.c hcproto.c hclink.c misc.c fsmid.c compat_sun.c
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
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!
39 $(CC) $(CFLAGS) $(LIBSMD5) $(OBJS) -o $(PROG)
45 DEPMARK=Everything below is generated by "make -f $(MAKEFILE) depend"
48 (sed '/^# *$(DEPMARK)$$/,$$d' $(MAKEFILE) ; \
49 echo '# $(DEPMARK)'; \
50 $(CC) $(CFLAGS) -xM1 $(SRCS) ) > $(MAKEFILE).new
51 mv -f $(MAKEFILE).new $(MAKEFILE)
53 # Everything below is generated by "make -f Makefile.sun depend"
61 hcproto.o: compat_sun.h
66 hclink.o: compat_sun.h
75 compat_sun.o: compat_sun.c
76 compat_sun.o: compat_sun.h