#ident "@(#)r-sunpro.dep 1.17 17/05/08 " ########################################################################### # Written 1996-2017 by J. Schilling ########################################################################### # # Dependency building rules for SunPro Make (Schilytools version) # ########################################################################### # 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. # A copy of the CDDL is also available via the Internet at # http://www.opensource.org/licenses/cddl1.txt # # 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) $@ ___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 DEP_DEP= $(ARCHDIR)/Dnull ########################################################################### depend: rmdep $(DEP_FILE) rmdep: $(RM) $(RM_FORCE) $(PALLDEP_FILE) ########################################################################### # # Make the complete path to the architecture subdirectory. # Make $(ARCHDIR)/man as well here to avoid this directory to become root # owned when root later calls "make install". # ########################################################################### $(ARCHDIR) $(ARCHDIR)/man: $(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. # ########################################################################### $(ARCHDIR)/%.d: %.c $(MKDEP) $(CPPFLAGS) $(MKDEP_OUT) $< \ | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o $(ARCHDIR)/\1.d:;' > $@ $(ARCHDIR)/%.d: %.C $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o $(ARCHDIR)/\1.d:;' > $@ $(ARCHDIR)/%.d: %.cc $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o $(ARCHDIR)/\1.d:;' > $@ $(ARCHDIR)/%.d: %.cpp $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o $(ARCHDIR)/\1.d:;' > $@ $(ARCHDIR)/%.d: %.cxx $(MKC++DEP) $(CPPFLAGS) $(MKC++DEP_OUT) $< \ | sed -e 's;^\(.*\)\.$o[ ]*:;$(ARCHDIR)/\1.$o $(ARCHDIR)/\1.d:;' > $@ $(PDEP_FILE): $(DEP_DEP) $(DEP_DEP): @if [ ! -f $@ ]; then \ echo " ==> MAKING DIRECTORY \"$(ARCHDIR)\""; \ $(_MKDIR) -p $(ARCHDIR); \ echo " ==> MAKING DIRECTORY \"$(ARCHDIR)/man\""; \ $(_MKDIR) -p $(ARCHDIR)/man; \ echo > $@; \ fi ########################################################################### # # Include the dependency file(s) generated from the rules above. # ########################################################################### include $(PDEP_FILE)