You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-backup/cpdup/files/cpdup-1.18-makefile.patch

31 lines
729 B

--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,9 @@
-# $DragonFly: src/bin/cpdup/Makefile,v 1.7 2008/04/10 22:09:08 dillon Exp $
-#
+OBJS = cpdup.o hcproto.o hclink.o misc.o fsmid.o
-PROG= cpdup
-SRCS= cpdup.c hcproto.c hclink.c misc.c fsmid.c
-
-.if defined(.FreeBSD)
-CFLAGS += -D_ST_FLAGS_PRESENT_=1
-WARNS?= 6
-.endif
-
-.if !defined(NOMD5)
-SRCS+= md5.c
-.endif
-
-LDADD+= -lmd
-DPADD+= ${LIBMD}
-
-.include <bsd.prog.mk>
+CPPFLAGS += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNOMD5 -DUSE_PTHREADS=1
+CPPFLAGS += $(shell $(PKG_CONFIG) --cflags libbsd)
+CFLAGS += -pthread
+LIBS += $(shell $(PKG_CONFIG) --libs libbsd)
+all: $(OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o cpdup $(LIBS)