Fix some other minor build system bugs.
This commit is contained in:
parent
e9db6c92ab
commit
79a78691b6
@ -10,4 +10,5 @@ syntax: regexp
|
|||||||
^jemalloc/lib$
|
^jemalloc/lib$
|
||||||
^jemalloc/Makefile$
|
^jemalloc/Makefile$
|
||||||
^jemalloc/src/jemalloc_defs\.h$
|
^jemalloc/src/jemalloc_defs\.h$
|
||||||
^jemalloc/src/[a-z]+.o$
|
^jemalloc/src/[a-z0-9]+.o$
|
||||||
|
^jemalloc/src/[a-z0-9]+.d$
|
||||||
|
@ -33,7 +33,7 @@ SO := so
|
|||||||
endif
|
endif
|
||||||
REV := 0
|
REV := 0
|
||||||
|
|
||||||
# File lists.
|
# List of files to be installed.
|
||||||
BINS := @bins@
|
BINS := @bins@
|
||||||
CHDRS := @srcroot@src/jemalloc.h @objroot@src/jemalloc_defs.h
|
CHDRS := @srcroot@src/jemalloc.h @objroot@src/jemalloc_defs.h
|
||||||
CSRCS := @srcroot@src/jemalloc.c
|
CSRCS := @srcroot@src/jemalloc.c
|
||||||
@ -41,13 +41,19 @@ DSOS := @objroot@lib/libjemalloc.so.$(REV) @objroot@lib/libjemalloc.so \
|
|||||||
@objroot@lib/libjemalloc_pic.a
|
@objroot@lib/libjemalloc_pic.a
|
||||||
MAN3 := @objroot@doc/jemalloc.3
|
MAN3 := @objroot@doc/jemalloc.3
|
||||||
|
|
||||||
|
#
|
||||||
|
# Include generated dependency files.
|
||||||
|
#
|
||||||
|
-include $(CSRCS:@srcroot@%.c=@objroot@%.d)
|
||||||
|
|
||||||
.PHONY: all dist install check clean distclean relclean
|
.PHONY: all dist install check clean distclean relclean
|
||||||
|
|
||||||
# Default target.
|
# Default target.
|
||||||
all: $(DSOS) bins
|
all: $(DSOS) bins
|
||||||
|
|
||||||
@objroot@src/%.o: @srcroot@src/%.c
|
@objroot@src/%.o: @srcroot@src/%.c
|
||||||
$(CC) $(CFLAGS) -c $(CPPFLAGS) -o $@ $+
|
$(CC) $(CFLAGS) -c $(CPPFLAGS) -o $@ $<
|
||||||
|
@$(SHELL) -ec "$(CC) -MM $(CPPFLAGS) $< | sed \"s/\($(subst /,\/,$(notdir $(basename $@)))\)\.o\([ :]*\)/$(subst /,\/,$(strip $(dir $@)))\1.o \2/g\" > $(@:%.o=%.d)"
|
||||||
|
|
||||||
$(DSOS): $(CSRCS:@srcroot@%.c=@objroot@%.o)
|
$(DSOS): $(CSRCS:@srcroot@%.c=@objroot@%.o)
|
||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
@ -59,11 +65,11 @@ bins: $(BINS)
|
|||||||
|
|
||||||
@objroot@bin/mtrgraph: @objroot@src/mtrgraph.o
|
@objroot@bin/mtrgraph: @objroot@src/mtrgraph.o
|
||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
$(CC) -o $@ $+ $(LDFLAGS) $(LIBS) $(GDLIBS)
|
$(CC) -o $@ $< $(LDFLAGS) $(LIBS) $(GDLIBS)
|
||||||
|
|
||||||
@objroot@bin/%: @objroot@src/%.o
|
@objroot@bin/%: @objroot@src/%.o
|
||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
$(CC) -o $@ $+ $(LDFLAGS) $(LIBS)
|
$(CC) -o $@ $< $(LDFLAGS) $(LIBS)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install -d $(BINDIR)
|
install -d $(BINDIR)
|
||||||
@ -91,10 +97,11 @@ check:
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(BINS)
|
rm -f $(BINS)
|
||||||
rm -f @objroot@src/*.o
|
rm -f $(BINS:@objroot@bin/%=@objroot@src/%.o)
|
||||||
rm -f @objroot@lib/libjemalloc.so
|
rm -f $(BINS:@objroot@bin/%=@objroot@src/%.d)
|
||||||
rm -f @objroot@lib/libjemalloc.so.$(REV)
|
rm -f $(CSRCS:@srcroot@%.c=@objroot@%.o)
|
||||||
rm -f @objroot@lib/libjemalloc_pic.a
|
rm -f $(CSRCS:@srcroot@%.c=@objroot@%.d)
|
||||||
|
rm -f $(DSOS)
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -f @objroot@config.log
|
rm -f @objroot@config.log
|
||||||
|
Loading…
Reference in New Issue
Block a user