openbsd-ports/graphics/netpbm/patches/patch-lib_util_Makefile
2007-05-09 15:47:57 +00:00

28 lines
931 B
Plaintext

$OpenBSD: patch-lib_util_Makefile,v 1.2 2007/05/09 15:47:57 naddy Exp $
--- lib/util/Makefile.orig Sat Feb 1 23:30:58 2003
+++ lib/util/Makefile Wed May 9 16:32:31 2007
@@ -12,17 +12,21 @@ CCOPT = $(CFLAGS) $(CFLAGS_SHLIB) $(CADD)
# nstring is required for asprintf(), etc. Also some systems don't have
# snprintf(), e.g. Solaris 2.5.1. 2002.03.29.
UTILOBJECTS = shhopt.o nstring.o
+SHUTILOBJECTS = $(patsubst %.o, %.lo, $(UTILOBJECTS))
# We have nothing to contribute to the merge, but must supply at least one
# merge object file.
MERGE_OBJECTS = empty.o
-all: $(UTILOBJECTS)
+all: $(UTILOBJECTS) $(SHUTILOBJECTS)
include $(SRCDIR)/Makefile.common
$(UTILOBJECTS):%.o:%.c
- $(CC) -c $(CCOPT) -o $@ $<
+ $(CC) -c $(CFLAGS) $(CADD) -o $@ $<
+
+$(SHUTILOBJECTS):%.lo:%.c
+ $(CC) -c $(CFLAGS) $(CFLAGS_SHLIB) $(CADD) -o $@ $<
testnstring: test.c nstring.h nstring.o
$(CC) $(CFLAGS) $(CADD) -o $@ nstring.o $<