mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
depend.mk, rules.mk: Move dependency rules from rules.mk to depend.mk
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
0dcb71a7b1
commit
e37efb1a5e
2 changed files with 18 additions and 22 deletions
|
|
@ -4,8 +4,16 @@ DEPEND_CPPFLAGS += -D__MAKEDEPEND__
|
|||
DEPEND_MK += $(addprefix .,$(addsuffix .dep.mk, $(OBJ)))
|
||||
|
||||
ifeq ($(DEPEND_MK_INCLUDED),)
|
||||
# mandatory target behaviour
|
||||
|
||||
all:
|
||||
clean: depclean
|
||||
|
||||
# convenience targets
|
||||
dep: $(DEPEND_MK)
|
||||
depclean:
|
||||
$(RM) -f .*.dep.mk
|
||||
|
||||
$(DEPEND_MK): $(PREREQ_DONE)
|
||||
|
||||
ifneq ($(DEPEND_MK),)
|
||||
ifeq ($(MAKECMDGOALS),)
|
||||
|
|
@ -16,16 +24,16 @@ ifneq ($(DEPEND_MK),)
|
|||
endif
|
||||
endif
|
||||
|
||||
clean: depclean my_depclean
|
||||
|
||||
# convenience targets
|
||||
dep: $(DEPEND_MK)
|
||||
my_depclean:
|
||||
$(RM) -f .*.dep.mk
|
||||
|
||||
# rules
|
||||
$(DEPEND_MK): $(PREREQ_DONE)
|
||||
%.o: .%.o.dep.mk
|
||||
|
||||
.%.o.dep.mk: %.cpp $(BUILD_HDR)
|
||||
$(CC) -M $(BUILD_CPPFLAGS) $(DEPEND_CPPFLAGS) $< -o $@
|
||||
|
||||
.%.o.dep.mk: %.cc $(BUILD_HDR)
|
||||
$(CC) -M $(BUILD_CPPFLAGS) $(DEPEND_CPPFLAGS) $< -o $@
|
||||
|
||||
.%.o.dep.mk: %.c $(BUILD_HDR)
|
||||
$(CC) -M $(BUILD_CFLAGS) $(DEPEND_CPPFLAGS) $< -o $@
|
||||
|
||||
endif # DEPEND_MK_INCLUDED
|
||||
DEPEND_MK_INCLUDED := true
|
||||
|
|
|
|||
|
|
@ -81,9 +81,6 @@ runclean: coreclean
|
|||
objclean:
|
||||
$(RM) -rf *.o *.o *.a *.so *.so.*
|
||||
|
||||
depclean:
|
||||
$(RM) -f .*.dep.mk
|
||||
|
||||
mocclean:
|
||||
$(RM) -rf moc_*
|
||||
|
||||
|
|
@ -251,15 +248,6 @@ strip.done: $(EXE_ALL)
|
|||
$(STRIP) $^
|
||||
touch $@
|
||||
|
||||
.%.o.dep.mk: %.cpp $(BUILD_HDR)
|
||||
$(CC) -M $(BUILD_CPPFLAGS) $(DEPEND_CPPFLAGS) $< -o $@
|
||||
|
||||
.%.o.dep.mk: %.cc $(BUILD_HDR)
|
||||
$(CC) -M $(BUILD_CPPFLAGS) $(DEPEND_CPPFLAGS) $< -o $@
|
||||
|
||||
.%.o.dep.mk: %.c $(BUILD_HDR)
|
||||
$(CC) -M $(BUILD_CFLAGS) $(DEPEND_CPPFLAGS) $< -o $@
|
||||
|
||||
ifeq ($(LIBTYPE),shared)
|
||||
$(SO_PREFIX)%.so: %.o
|
||||
$(LD) -shared $(BUILD_LDFLAGS) $(FLAVOUR_PREFIX)$^ -o $@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue