freebsd-ports/devel/ptmalloc/files/patch-Makefile
Maho Nakata c3f2ed4972 Fix typos.
PR:		127641
Submitted by:	Pedro Giffuni <giffunip@tutopia.com>
2008-10-07 00:38:13 +00:00

51 lines
1.3 KiB
Text

--- Makefile.orig 2006-03-31 11:25:23.000000000 -0500
+++ Makefile 2008-08-30 17:37:37.000000000 -0500
@@ -17,12 +17,12 @@
TAR_FLAGS = --numeric-owner --exclude "*~" --exclude "debian/tmp*"
#CC = /pkg/gcc-2.95.2-wg/bin/gcc
-CC = gcc
+CC ?= cc
SYS_FLAGS =
-OPT_FLAGS = -g -O2 #-O # -O2
+OPT_FLAGS = -O2 #-O # -O2
WARN_FLAGS = -Wall -Wstrict-prototypes
-SH_FLAGS = -shared -fpic
+SH_FLAGS = -shared -fPIC
INC_FLAGS = -Isysdeps/generic
@@ -44,17 +44,20 @@
MALLOC_OBJ = ptmalloc3.o malloc.o
LIB_MALLOC = libptmalloc3.a
+# Target libraries
+LIBS = libptmalloc3.a ptmalloc3.so
+
T_SUF =
TESTS = t-test1$(T_SUF) t-test2$(T_SUF) \
tst-independent-alloc$(T_SUF)
#m-test1$(T_SUF) tst-mallocstate$(T_SUF) tst-mstats$(T_SUF)
-CFLAGS = $(SYS_FLAGS) $(OPT_FLAGS) $(WARN_FLAGS) $(THR_FLAGS) $(INC_FLAGS)
+CFLAGS += $(SYS_FLAGS) $(OPT_FLAGS) $(WARN_FLAGS) $(THR_FLAGS) $(INC_FLAGS)
.c.o:
$(CC) -c $(CFLAGS) $<
-all: $(LIB_MALLOC) $(TESTS)
+all: $(LIBS) $(TESTS)
ptmalloc3.o: ptmalloc3.c malloc-2.8.3.h
$(CC) -c $(CFLAGS) $(M_FLAGS) -DMSPACES=1 $<
@@ -72,6 +75,9 @@
libptmalloc3.so: $(MALLOC_OBJ)
$(CC) $(SH_FLAGS) $(CFLAGS) $(M_FLAGS) $(MALLOC_OBJ) -o $@
+ptmalloc3.so: ptmalloc3.c malloc-2.8.3.h
+ $(CC) $(SH_FLAGS) $(CFLAGS) $(M_FLAGS) malloc.c -o $@
+
again:
$(RM) $(TESTS)
$(MAKE) $(TESTS)