Commit f62e2d2c authored by albert's avatar albert

Recursive Make Considered Harmful

parent 5ef0ba1b
......@@ -27,7 +27,7 @@ LIBOBJ := $(LIBSRC:.c=.o)
# Clean away all output files, .depend, and symlinks.
# Use wildcards in case the version has changed.
CLEAN += proc/.depend proc/lib*.so* proc/lib*.a $(LIBOBJ)
DIRS += proc
DIRS += proc/
#proc/lib$(NAME).a: $(LIBOBJ)
# $(AR) rcs $@ $^
......@@ -40,7 +40,10 @@ proc/$(SONAME): $(LIBOBJ)
# AUTOMATIC DEPENDENCY GENERATION -- GCC AND GNUMAKE DEPENDENT
proc/.depend: $(LIBSRC) $(LIBHDR)
$(strip $(CC) $(LIB_CFLAGS) -MM -MG $(LIBSRC) > $@)
ifneq ($(MAKECMDGOALS),clean)
-include proc/.depend
endif
$(lib)/$(SONAME) : proc/$(SONAME)
......@@ -63,7 +66,7 @@ $(lib)/$(SONAME) : proc/$(SONAME)
proc/version.o: proc/version.c proc/version.h
ifdef MINORVERSION
$(strip $(CC) $(LIB_CFLAGS) -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" -c proc/version.c)
$(strip $(CC) $(LIB_CFLAGS) -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" -c -o $@ $<)
else
$(strip $(CC) $(LIB_CFLAGS) -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -c proc/version.c)
$(strip $(CC) $(LIB_CFLAGS) -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -c -o $@ $<)
endif
......@@ -6,7 +6,7 @@ INSTALL += $(bin)ps
CLEAN += ps/ps ps/debug
# a directory for cleaning
DIRS += ps
DIRS += ps/
# a file to create
ALL += ps/ps
......@@ -23,7 +23,7 @@ ps/debug: $(PSOBJ) stacktrace.o $(LIBPROC)
$(CC) -o $@ $^ -lefence
$(PSOBJ): %.o: ps/%.c ps/common.h proc/$(SONAME)
# $(CC) -c $(CFLAGS) $< -o $@
$(CC) -c $(CFLAGS) $< -o $@
ps/stacktrace.o: ps/stacktrace.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment