summaryrefslogtreecommitdiff
path: root/libc/stdlib/malloc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib/malloc/Makefile')
-rw-r--r--libc/stdlib/malloc/Makefile15
1 files changed, 7 insertions, 8 deletions
diff --git a/libc/stdlib/malloc/Makefile b/libc/stdlib/malloc/Makefile
index d4ecab0b9..ba2567f12 100644
--- a/libc/stdlib/malloc/Makefile
+++ b/libc/stdlib/malloc/Makefile
@@ -24,17 +24,16 @@ TOPDIR=../
include $(TOPDIR)Rules.make
LIBC=$(TOPDIR)libc.a
-MSRC=alloc.c
-MOBJ=malloc.o realloc.o free.o calloc.o malloc_dbg.o free_dbg.o calloc_dbg.o
+CSRC=malloc.c
+COBJS=$(patsubst %.c,%.o, $(CSRC))
-all: $(MOBJ) $(LIBC)
-$(LIBC): $(MOBJ)
- $(AR) $(ARFLAGS) $(LIBC) $(MOBJ)
+all: $(COBJS) $(LIBC)
-$(MOBJ): $(MSRC)
- $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
+$(LIBC): $(COBJS)
+ $(AR) $(ARFLAGS) $(LIBC) $(COBJS)
+
+$(COBJS): Makefile
clean:
rm -f *.[oa] *~ core
-