#ident "@(#)r-smake.dep 1.12 06/07/31 " ########################################################################### # Written 1996 by J. Schilling ########################################################################### # # Dependency building rules for smake # ########################################################################### # Copyright (c) J. Schilling ########################################################################### # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only # (the "License"). You may not use this file except in compliance # with the License. # # See the file CDDL.Schily.txt in this distribution for details. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file CDDL.Schily.txt from this distribution. ########################################################################### DEP_SUFFIX= .d RMDEP= $(RM) $(RM_FORCE) $(ARCHDIR)/$@ ___C++DEP_FILES= $(C++FILES:%.C=%.d) __C++DEP_FILES= $(___C++DEP_FILES:%.cc=%.d) _C++DEP_FILES= $(__C++DEP_FILES:%.cpp=%.d) C++DEP_FILES= $(_C++DEP_FILES:%.cxx=%.d) C++PDEP_FILES= $(C++DEP_FILES:%=$(ARCHDIR)/%) DEP_FILE= $(CFILES:%.c=%.d) $(C++DEP_FILES) PDEP_FILE= $(CFILES:%.c=$(ARCHDIR)/%.d) $(C++PDEP_FILES) PALLDEP_FILE= $(CFILES:%.c=$(ARCHDIR)/%.d) $(C++PDEP_FILES) $(ARCHDIR)/$(TARGET).dep ########################################################################### depend: rmdep $(DEP_FILE) rmdep: $(RM) $(RM_FORCE) $(PALLDEP_FILE) ########################################################################### # # Make the complete path to the architecture subdirectory. # ########################################################################### $(ARCHDIR): $(MKDIR) -p $@ ########################################################################### # # Generate dependency file(s). # This rules is checked when the dependency file(s) are included. # # Modify the the path for .o files to reflect that they are placed in # $(ARCHDIR). Add the dependency file itself to each line so that # the dependencies will be rebuilt if a source is newer that the # appropriate dependency file. # ########################################################################### .d: .c $(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \ | sed -e 's;^\(.*\)\.$o[ ]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@ %.d: %.c $(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \ | sed -e 's;^\(.*\)\.$o[ ]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@ %.d: %.C $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ | sed -e 's;^\(.*\)\.$o[ ]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@ %.d: %.cc $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ | sed -e 's;^\(.*\)\.$o[ ]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@ %.d: %.cpp $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ | sed -e 's;^\(.*\)\.$o[ ]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@ %.d: %.cxx $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ | sed -e 's;^\(.*\)\.$o[ ]*:;\1.$o \1.d:;' > $(ARCHDIR)/$@ Dnull: $(ARCHDIR) @echo > $O/$@ #$(DEP_FILE): # $(MKDEP) $(CPPFLAGS) -f - $(CFILES) \ # | sed -e 's;^\(.*\.$o[ ]*:\);$(ARCHDIR)/\1;' > $@ ########################################################################### # # Include the dependency file(s) generated from the rules above. # ########################################################################### -include Dnull $(DEP_FILE)