projects
/
ftsbench.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove making of library: now just linking nesessary object files
[ftsbench.git]
/
Makefile.global
diff --git
a/Makefile.global
b/Makefile.global
index
5232a32
..
601c037
100644
(file)
--- a/
Makefile.global
+++ b/
Makefile.global
@@
-35,10
+35,6
@@
ifdef SUBDIRS
SUBDIROBJS := $(SUBDIRS:%=%/SUBSYS.o)
endif
SUBDIROBJS := $(SUBDIRS:%=%/SUBSYS.o)
endif
-ifdef PROGRAM
-PROGRAMOBJ := $(PROGRAM:%=%.o)
-endif
-
.SUFFIXES: .o.c
.c.o:
.SUFFIXES: .o.c
.c.o:
@@
-46,13
+42,19
@@
endif
all: $(SUBSYS) $(LIBRARY) $(PROGRAM)
all: $(SUBSYS) $(LIBRARY) $(PROGRAM)
+define prog_dep
+ $(1): $$(PROGRAMOBJ_$(1))
+endef
+
+$(foreach prog,$(PROGRAM),$(eval $(call prog_dep,$(prog))))
+
ifdef PROGRAM
ifdef LIBRARY
$(PROGRAM): $(LIBRARY)
endif
$(PROGRAM): %: %.o
ifdef PROGRAM
ifdef LIBRARY
$(PROGRAM): $(LIBRARY)
endif
$(PROGRAM): %: %.o
- $(CC) -o $@ $< $(LIBRARY) $(LIB)
+ $(CC) -o $@ $< $(
PROGRAMOBJ_$(@)) $(
LIBRARY) $(LIB)
endif
ifdef LIBRARY
endif
ifdef LIBRARY
@@
-70,18
+72,17
@@
ifdef SUBDIRS
$(SUBDIROBJS): $(SUBDIRS:%=%-recursive) ;
$(SUBDIRS:%=%-recursive):
$(SUBDIROBJS): $(SUBDIRS:%=%-recursive) ;
$(SUBDIRS:%=%-recursive):
- $(MAKE) -C $(subst -recursive,,$@) -f Makefile SUBSYS.o
+ $(MAKE) -C $(subst -recursive,,$@) -f Makefile
OS=$(OS)
SUBSYS.o
endif
clean:
endif
clean:
-ifdef OBJ
- rm -rf $(OBJ)
-endif
ifdef LIBOBJ
rm -rf $(LIBOBJ)
endif
ifdef PROGRAM
ifdef LIBOBJ
rm -rf $(LIBOBJ)
endif
ifdef PROGRAM
- rm -rf $(PROGRAM) $(PROGRAMOBJ) *core core.*
+ rm -rf $(PROGRAM)
+ rm -rf $(foreach P, $(PROGRAM), $P.o $(PROGRAMOBJ_$(P)))
+ rm -rf *core core.*
endif
ifdef LIBRARY
rm -rf $(LIBRARY)
endif
ifdef LIBRARY
rm -rf $(LIBRARY)
@@
-90,5
+91,5
@@
ifdef SUBOBJ
rm -rf $(SUBOBJ) $(SUBSYS)
endif
ifdef SUBDIRS
rm -rf $(SUBOBJ) $(SUBSYS)
endif
ifdef SUBDIRS
- for dir in $(SUBDIRS); do $(MAKE) -f Makefile -C $$dir clean || exit; done
+ for dir in $(SUBDIRS); do $(MAKE) -f Makefile -C $$dir
OS=$(OS)
clean || exit; done
endif
endif