mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
39 lines
796 B
Makefile
39 lines
796 B
Makefile
# variables
|
|
DEPEND_CFLAGS += -D__MAKEDEPEND__
|
|
DEPEND_CPPFLAGS += -D__MAKEDEPEND__
|
|
DEPEND_MK += $(addprefix .,$(addsuffix .dep.mk, $(OBJ)))
|
|
|
|
ifeq ($(DEPEND_MK_INCLUDED),)
|
|
|
|
all:
|
|
clean: depclean
|
|
|
|
# convenience targets
|
|
dep: $(DEPEND_MK)
|
|
depclean:
|
|
$(RM) -f .*.dep.mk
|
|
|
|
$(DEPEND_MK): $(PREREQ_DONE)
|
|
|
|
ifneq ($(DEPEND_MK),)
|
|
ifeq ($(MAKECMDGOALS),)
|
|
-include $(DEPEND_MK)
|
|
endif
|
|
ifneq ($(filter all,$(MAKECMDGOALS)),)
|
|
-include $(DEPEND_MK)
|
|
endif
|
|
endif
|
|
|
|
%.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
|