# # Makefile for Solaris, using the Sun Studio compiler. # To compile, type this command: # # make -f Makefile.sun # # To compile without MD5 support: # # make -f Makefile.sun NOMD5=yes # # Notes: # -- There is no "install" target. Just copy the cpdup # binary wherever you want. # -- The cpdup.1 manual page uses BSD mdoc syntax which # doesn't work on Solaris. It is suggested that you # create a catpage on a BSD machine like this: # nroff -man cpdup.1 > cpdup.txt # and then view that catpage with "more cpdup.txt" # on Solaris. # PROG= cpdup SRCS= cpdup.c hcproto.c hclink.c misc.c fsmid.c compat_sun.c DEFSMD5:sh = test -n "${NOMD5}" && echo -DNOMD5; true LIBSMD5:sh = test -z "${NOMD5}" && echo -lmd5; true SRCSMD5:sh = test -z "${NOMD5}" && echo md5.c; true SRCS += $(SRCSMD5) OBJS=$(SRCS:%.c=%.o) CC=cc CFLAGS=-xO5 -v -D_LARGEFILE64_SOURCE $(DEFSMD5) # Note: Do not use "-fast" because it makes errno unreliable # and breaks certain aliasing and alignment assumptions! $(PROG): $(OBJS) $(CC) $(CFLAGS) $(LIBSMD5) $(OBJS) -o $(PROG) clean: rm -f $(PROG) $(OBJS) MAKEFILE=Makefile.sun DEPMARK=Everything below is generated by "make -f $(MAKEFILE) depend" depend: (sed '/^# *$(DEPMARK)$$/,$$d' $(MAKEFILE) ; \ echo '# $(DEPMARK)'; \ $(CC) $(CFLAGS) -xM1 $(SRCS) ) > $(MAKEFILE).new mv -f $(MAKEFILE).new $(MAKEFILE) # Everything below is generated by "make -f Makefile.sun depend" cpdup.o: cpdup.c cpdup.o: cpdup.h cpdup.o: compat_sun.h cpdup.o: hclink.h cpdup.o: hcproto.h hcproto.o: hcproto.c hcproto.o: cpdup.h hcproto.o: compat_sun.h hcproto.o: hclink.h hcproto.o: hcproto.h hclink.o: hclink.c hclink.o: cpdup.h hclink.o: compat_sun.h hclink.o: hclink.h hclink.o: hcproto.h misc.o: misc.c misc.o: cpdup.h misc.o: compat_sun.h fsmid.o: fsmid.c fsmid.o: cpdup.h fsmid.o: compat_sun.h compat_sun.o: compat_sun.c compat_sun.o: compat_sun.h md5.o: md5.c md5.o: cpdup.h md5.o: compat_sun.h