michael@0: #! gmake michael@0: # michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: ################################################################################ michael@0: # We used to have a 4 pass build process. Now we do everything in one pass. michael@0: # michael@0: # export - Create generated headers and stubs. Publish public headers to michael@0: # dist//include. michael@0: # Create libraries. Publish libraries to dist//lib. michael@0: # Create programs. michael@0: # michael@0: # libs - obsolete. Now a synonym of "export". michael@0: # michael@0: # all - the default makefile target. Now a synonym of "export". michael@0: # michael@0: # install - Install headers, libraries, and programs on the system. michael@0: # michael@0: # Parameters to this makefile (set these before including): michael@0: # michael@0: # a) michael@0: # TARGETS -- the target to create michael@0: # (defaults to $LIBRARY $PROGRAM) michael@0: # b) michael@0: # DIRS -- subdirectories for make to recurse on michael@0: # (the 'all' rule builds $TARGETS $DIRS) michael@0: # c) michael@0: # CSRCS -- .c files to compile michael@0: # (used to define $OBJS) michael@0: # d) michael@0: # PROGRAM -- the target program name to create from $OBJS michael@0: # ($OBJDIR automatically prepended to it) michael@0: # e) michael@0: # LIBRARY -- the target library name to create from $OBJS michael@0: # ($OBJDIR automatically prepended to it) michael@0: # michael@0: ################################################################################ michael@0: michael@0: ifndef topsrcdir michael@0: topsrcdir=$(MOD_DEPTH) michael@0: endif michael@0: michael@0: ifndef srcdir michael@0: srcdir=. michael@0: endif michael@0: michael@0: ifndef NSPR_CONFIG_MK michael@0: include $(topsrcdir)/config/config.mk michael@0: endif michael@0: michael@0: ifdef USE_AUTOCONF michael@0: ifdef CROSS_COMPILE michael@0: ifdef INTERNAL_TOOLS michael@0: CC=$(HOST_CC) michael@0: CCC=$(HOST_CXX) michael@0: CFLAGS=$(HOST_CFLAGS) michael@0: CXXFLAGS=$(HOST_CXXFLAGS) michael@0: LDFLAGS=$(HOST_LDFLAGS) michael@0: endif michael@0: endif michael@0: endif michael@0: michael@0: # michael@0: # This makefile contains rules for building the following kinds of michael@0: # libraries: michael@0: # - LIBRARY: a static (archival) library michael@0: # - SHARED_LIBRARY: a shared (dynamic link) library michael@0: # - IMPORT_LIBRARY: an import library, used only on Windows and OS/2 michael@0: # michael@0: # The names of these libraries can be generated by simply specifying michael@0: # LIBRARY_NAME and LIBRARY_VERSION. michael@0: # michael@0: michael@0: ifdef LIBRARY_NAME michael@0: ifeq (,$(filter-out WINNT WINCE OS2,$(OS_ARCH))) michael@0: michael@0: # michael@0: # Win95 and OS/2 require library names conforming to the 8.3 rule. michael@0: # other platforms do not. michael@0: # michael@0: ifeq (,$(filter-out WIN95 WINCE WINMO OS2,$(OS_TARGET))) michael@0: LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX) michael@0: SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) michael@0: IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX) michael@0: SHARED_LIB_PDB = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).pdb michael@0: else michael@0: LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX) michael@0: SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) michael@0: IMPORT_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX) michael@0: SHARED_LIB_PDB = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).pdb michael@0: endif michael@0: michael@0: else michael@0: michael@0: LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX) michael@0: ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1) michael@0: SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_shr.a michael@0: else michael@0: ifdef MKSHLIB michael@0: SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) michael@0: endif michael@0: endif michael@0: michael@0: endif michael@0: endif michael@0: michael@0: ifndef TARGETS michael@0: ifeq (,$(filter-out WINNT WINCE OS2,$(OS_ARCH))) michael@0: TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) michael@0: ifdef MOZ_DEBUG_SYMBOLS michael@0: ifdef MSC_VER michael@0: ifneq (,$(filter-out 1100 1200,$(MSC_VER))) michael@0: TARGETS += $(SHARED_LIB_PDB) michael@0: endif michael@0: endif michael@0: endif michael@0: else michael@0: TARGETS = $(LIBRARY) $(SHARED_LIBRARY) michael@0: endif michael@0: endif michael@0: michael@0: # michael@0: # OBJS is the list of object files. It can be constructed by michael@0: # specifying CSRCS (list of C source files) and ASFILES (list michael@0: # of assembly language source files). michael@0: # michael@0: michael@0: ifndef OBJS michael@0: OBJS = $(addprefix $(OBJDIR)/,$(CSRCS:.c=.$(OBJ_SUFFIX))) \ michael@0: $(addprefix $(OBJDIR)/,$(ASFILES:.$(ASM_SUFFIX)=.$(OBJ_SUFFIX))) michael@0: endif michael@0: michael@0: ALL_TRASH = $(TARGETS) $(OBJS) $(RES) $(filter-out . .., $(OBJDIR)) LOGS TAGS $(GARBAGE) \ michael@0: $(NOSUCHFILE) \ michael@0: $(OBJS:.$(OBJ_SUFFIX)=.i_o) \ michael@0: so_locations michael@0: michael@0: ifndef RELEASE_LIBS_DEST michael@0: RELEASE_LIBS_DEST = $(RELEASE_LIB_DIR) michael@0: endif michael@0: michael@0: define MAKE_IN_DIR michael@0: $(MAKE) -C $(dir) $@ michael@0: michael@0: endef # do not remove the blank line! michael@0: michael@0: ifdef DIRS michael@0: LOOP_OVER_DIRS = $(foreach dir,$(DIRS),$(MAKE_IN_DIR)) michael@0: endif michael@0: michael@0: ################################################################################ michael@0: michael@0: all:: export michael@0: michael@0: export:: michael@0: +$(LOOP_OVER_DIRS) michael@0: michael@0: libs:: export michael@0: michael@0: clean:: michael@0: rm -rf $(OBJS) $(RES) so_locations $(NOSUCHFILE) $(GARBAGE) michael@0: +$(LOOP_OVER_DIRS) michael@0: michael@0: clobber:: michael@0: rm -rf $(OBJS) $(RES) $(TARGETS) $(filter-out . ..,$(OBJDIR)) $(GARBAGE) so_locations $(NOSUCHFILE) michael@0: +$(LOOP_OVER_DIRS) michael@0: michael@0: realclean clobber_all:: michael@0: rm -rf $(wildcard *.OBJ *.OBJD) dist $(ALL_TRASH) michael@0: +$(LOOP_OVER_DIRS) michael@0: michael@0: distclean:: michael@0: rm -rf $(wildcard *.OBJ *.OBJD) dist $(ALL_TRASH) $(DIST_GARBAGE) michael@0: +$(LOOP_OVER_DIRS) michael@0: michael@0: install:: $(RELEASE_BINS) $(RELEASE_HEADERS) $(RELEASE_LIBS) michael@0: ifdef RELEASE_BINS michael@0: $(NSINSTALL) -t -m 0755 $(RELEASE_BINS) $(DESTDIR)$(bindir) michael@0: endif michael@0: ifdef RELEASE_HEADERS michael@0: $(NSINSTALL) -t -m 0644 $(RELEASE_HEADERS) $(DESTDIR)$(includedir)/$(include_subdir) michael@0: endif michael@0: ifdef RELEASE_LIBS michael@0: $(NSINSTALL) -t -m 0755 $(RELEASE_LIBS) $(DESTDIR)$(libdir)/$(lib_subdir) michael@0: endif michael@0: +$(LOOP_OVER_DIRS) michael@0: michael@0: release:: export michael@0: ifdef RELEASE_BINS michael@0: @echo "Copying executable programs and scripts to release directory" michael@0: @if test -z "$(BUILD_NUMBER)"; then \ michael@0: echo "BUILD_NUMBER must be defined"; \ michael@0: false; \ michael@0: else \ michael@0: true; \ michael@0: fi michael@0: @if test ! -d $(RELEASE_BIN_DIR); then \ michael@0: rm -rf $(RELEASE_BIN_DIR); \ michael@0: $(NSINSTALL) -D $(RELEASE_BIN_DIR);\ michael@0: else \ michael@0: true; \ michael@0: fi michael@0: cp $(RELEASE_BINS) $(RELEASE_BIN_DIR) michael@0: endif michael@0: ifdef RELEASE_LIBS michael@0: @echo "Copying libraries to release directory" michael@0: @if test -z "$(BUILD_NUMBER)"; then \ michael@0: echo "BUILD_NUMBER must be defined"; \ michael@0: false; \ michael@0: else \ michael@0: true; \ michael@0: fi michael@0: @if test ! -d $(RELEASE_LIBS_DEST); then \ michael@0: rm -rf $(RELEASE_LIBS_DEST); \ michael@0: $(NSINSTALL) -D $(RELEASE_LIBS_DEST);\ michael@0: else \ michael@0: true; \ michael@0: fi michael@0: cp $(RELEASE_LIBS) $(RELEASE_LIBS_DEST) michael@0: endif michael@0: ifdef RELEASE_HEADERS michael@0: @echo "Copying header files to release directory" michael@0: @if test -z "$(BUILD_NUMBER)"; then \ michael@0: echo "BUILD_NUMBER must be defined"; \ michael@0: false; \ michael@0: else \ michael@0: true; \ michael@0: fi michael@0: @if test ! -d $(RELEASE_HEADERS_DEST); then \ michael@0: rm -rf $(RELEASE_HEADERS_DEST); \ michael@0: $(NSINSTALL) -D $(RELEASE_HEADERS_DEST);\ michael@0: else \ michael@0: true; \ michael@0: fi michael@0: cp $(RELEASE_HEADERS) $(RELEASE_HEADERS_DEST) michael@0: endif michael@0: +$(LOOP_OVER_DIRS) michael@0: michael@0: alltags: michael@0: rm -f TAGS tags michael@0: find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs etags -a michael@0: find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs ctags -a michael@0: michael@0: $(NFSPWD): michael@0: cd $(@D); $(MAKE) $(@F) michael@0: michael@0: $(PROGRAM): $(OBJS) michael@0: @$(MAKE_OBJDIR) michael@0: ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT) michael@0: ifdef MOZ_PROFILE_USE michael@0: # In the second pass, we need to merge the pgc files into the pgd file. michael@0: # The compiler would do this for us automatically if they were in the right michael@0: # place, but they're in dist/bin. michael@0: python $(topsrcdir)/build/win32/pgomerge.py \ michael@0: $(notdir $(PROGRAM:.exe=)) $(DIST)/bin michael@0: endif # MOZ_PROFILE_USE michael@0: $(CC) $(OBJS) -Fe$@ -link $(LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS) michael@0: ifdef MT michael@0: @if test -f $@.manifest; then \ michael@0: $(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \ michael@0: rm -f $@.manifest; \ michael@0: fi michael@0: endif # MSVC with manifest tool michael@0: ifdef MOZ_PROFILE_GENERATE michael@0: # touch it a few seconds into the future to work around FAT's michael@0: # 2-second granularity michael@0: touch -t `date +%Y%m%d%H%M.%S -d "now+5seconds"` pgo.relink michael@0: endif # MOZ_PROFILE_GENERATE michael@0: else # WINNT && !GCC michael@0: $(CC) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) $(WRAP_LDFLAGS) michael@0: endif # WINNT && !GCC michael@0: ifdef ENABLE_STRIP michael@0: $(STRIP) $@ michael@0: endif michael@0: michael@0: $(LIBRARY): $(OBJS) michael@0: @$(MAKE_OBJDIR) michael@0: rm -f $@ michael@0: $(AR) $(AR_FLAGS) $(OBJS) $(AR_EXTRA_ARGS) michael@0: $(RANLIB) $@ michael@0: michael@0: ifeq ($(OS_TARGET), OS2) michael@0: $(IMPORT_LIBRARY): $(MAPFILE) michael@0: rm -f $@ michael@0: $(IMPLIB) $@ $(MAPFILE) michael@0: else michael@0: ifeq (,$(filter-out WIN95 WINCE WINMO,$(OS_TARGET))) michael@0: # PDBs and import libraries need to depend on the shared library to michael@0: # order dependencies properly. michael@0: $(IMPORT_LIBRARY): $(SHARED_LIBRARY) michael@0: $(SHARED_LIB_PDB): $(SHARED_LIBRARY) michael@0: endif michael@0: endif michael@0: michael@0: $(SHARED_LIBRARY): $(OBJS) $(RES) $(MAPFILE) michael@0: @$(MAKE_OBJDIR) michael@0: rm -f $@ michael@0: ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1) michael@0: echo "#!" > $(OBJDIR)/lib$(LIBRARY_NAME)_syms michael@0: nm -B -C -g $(OBJS) \ michael@0: | awk '/ [T,D] / {print $$3}' \ michael@0: | sed -e 's/^\.//' \ michael@0: | sort -u >> $(OBJDIR)/lib$(LIBRARY_NAME)_syms michael@0: $(LD) $(XCFLAGS) -o $@ $(OBJS) -bE:$(OBJDIR)/lib$(LIBRARY_NAME)_syms \ michael@0: -bM:SRE -bnoentry $(OS_LIBS) $(EXTRA_LIBS) michael@0: else # AIX 4.1 michael@0: ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT) michael@0: ifdef MOZ_PROFILE_USE michael@0: python $(topsrcdir)/build/win32/pgomerge.py \ michael@0: $(notdir $(SHARED_LIBRARY:.$(DLL_SUFFIX)=)) $(DIST)/bin michael@0: endif # MOZ_PROFILE_USE michael@0: $(LINK_DLL) -MAP $(DLLBASE) $(DLL_LIBS) $(EXTRA_LIBS) $(OBJS) $(RES) michael@0: ifdef MT michael@0: @if test -f $@.manifest; then \ michael@0: $(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;2; \ michael@0: rm -f $@.manifest; \ michael@0: fi michael@0: endif # MSVC with manifest tool michael@0: ifdef MOZ_PROFILE_GENERATE michael@0: touch -t `date +%Y%m%d%H%M.%S -d "now+5seconds"` pgo.relink michael@0: endif # MOZ_PROFILE_GENERATE michael@0: else # WINNT && !GCC michael@0: $(MKSHLIB) $(OBJS) $(RES) $(LDFLAGS) $(WRAP_LDFLAGS) $(EXTRA_LIBS) michael@0: endif # WINNT && !GCC michael@0: endif # AIX 4.1 michael@0: ifdef ENABLE_STRIP michael@0: $(STRIP) $@ michael@0: endif michael@0: michael@0: ################################################################################ michael@0: michael@0: ifdef MOZ_PROFILE_USE michael@0: ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT) michael@0: # When building with PGO, we have to make sure to re-link michael@0: # in the MOZ_PROFILE_USE phase if we linked in the michael@0: # MOZ_PROFILE_GENERATE phase. We'll touch this pgo.relink michael@0: # file in the link rule in the GENERATE phase to indicate michael@0: # that we need a relink. michael@0: $(SHARED_LIBRARY): pgo.relink michael@0: michael@0: $(PROGRAM): pgo.relink michael@0: michael@0: endif # WINNT && !GCC michael@0: endif # MOZ_PROFILE_USE michael@0: michael@0: ifneq (,$(MOZ_PROFILE_GENERATE)$(MOZ_PROFILE_USE)) michael@0: ifdef NS_USE_GCC michael@0: # Force rebuilding libraries and programs in both passes because each michael@0: # pass uses different object files. michael@0: $(PROGRAM) $(SHARED_LIBRARY) $(LIBRARY): FORCE michael@0: .PHONY: FORCE michael@0: endif michael@0: endif michael@0: michael@0: ################################################################################ michael@0: michael@0: ifdef MOZ_PROFILE_GENERATE michael@0: # Clean up profiling data during PROFILE_GENERATE phase michael@0: export:: michael@0: ifeq ($(OS_ARCH)_$(NS_USE_GCC), WINNT_) michael@0: $(foreach pgd,$(wildcard *.pgd),pgomgr -clear $(pgd);) michael@0: else michael@0: ifdef NS_USE_GCC michael@0: -$(RM) *.gcda michael@0: endif michael@0: endif michael@0: endif michael@0: michael@0: ################################################################################ michael@0: michael@0: ifeq ($(OS_ARCH),WINNT) michael@0: $(RES): $(RESNAME) michael@0: @$(MAKE_OBJDIR) michael@0: # The resource compiler does not understand the -U option. michael@0: ifdef NS_USE_GCC michael@0: $(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $< michael@0: else michael@0: $(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $< michael@0: endif # GCC michael@0: @echo $(RES) finished michael@0: endif michael@0: michael@0: $(MAPFILE): $(LIBRARY_NAME).def michael@0: @$(MAKE_OBJDIR) michael@0: ifeq ($(OS_ARCH),SunOS) michael@0: grep -v ';-' $< | \ michael@0: sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ michael@0: endif michael@0: ifeq ($(OS_ARCH),OS2) michael@0: echo LIBRARY $(LIBRARY_NAME)$(LIBRARY_VERSION) INITINSTANCE TERMINSTANCE > $@ michael@0: echo PROTMODE >> $@ michael@0: echo CODE LOADONCALL MOVEABLE DISCARDABLE >> $@ michael@0: echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@ michael@0: echo EXPORTS >> $@ michael@0: grep -v ';+' $< | grep -v ';-' | \ michael@0: sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,\([\t ]*\),\1_,' | \ michael@0: awk 'BEGIN {ord=1;} { print($$0 " @" ord " RESIDENTNAME"); ord++;}' >> $@ michael@0: $(ADD_TO_DEF_FILE) michael@0: endif michael@0: michael@0: # michael@0: # Translate source filenames to absolute paths. This is required for michael@0: # debuggers under Windows and OS/2 to find source files automatically. michael@0: # michael@0: michael@0: ifeq (,$(filter-out AIX OS2,$(OS_ARCH))) michael@0: NEED_ABSOLUTE_PATH = 1 michael@0: endif michael@0: michael@0: ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT) michael@0: NEED_ABSOLUTE_PATH = 1 michael@0: endif michael@0: michael@0: ifdef NEED_ABSOLUTE_PATH michael@0: # The quotes allow absolute paths to contain spaces. michael@0: pr_abspath = "$(if $(findstring :,$(1)),$(1),$(if $(filter /%,$(1)),$(1),$(CURDIR)/$(1)))" michael@0: endif michael@0: michael@0: $(OBJDIR)/%.$(OBJ_SUFFIX): %.cpp michael@0: @$(MAKE_OBJDIR) michael@0: ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT) michael@0: $(CCC) -Fo$@ -c $(CCCFLAGS) $(call pr_abspath,$<) michael@0: else michael@0: ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINCE) michael@0: $(CCC) -Fo$@ -c $(CCCFLAGS) $< michael@0: else michael@0: ifdef NEED_ABSOLUTE_PATH michael@0: $(CCC) -o $@ -c $(CCCFLAGS) $(call pr_abspath,$<) michael@0: else michael@0: $(CCC) -o $@ -c $(CCCFLAGS) $< michael@0: endif michael@0: endif michael@0: endif michael@0: michael@0: WCCFLAGS1 = $(subst /,\\,$(CFLAGS)) michael@0: WCCFLAGS2 = $(subst -I,-i=,$(WCCFLAGS1)) michael@0: WCCFLAGS3 = $(subst -D,-d,$(WCCFLAGS2)) michael@0: $(OBJDIR)/%.$(OBJ_SUFFIX): %.c michael@0: @$(MAKE_OBJDIR) michael@0: ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT) michael@0: $(CC) -Fo$@ -c $(CFLAGS) $(call pr_abspath,$<) michael@0: else michael@0: ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINCE) michael@0: $(CC) -Fo$@ -c $(CFLAGS) $< michael@0: else michael@0: ifdef NEED_ABSOLUTE_PATH michael@0: $(CC) -o $@ -c $(CFLAGS) $(call pr_abspath,$<) michael@0: else michael@0: $(CC) -o $@ -c $(CFLAGS) $< michael@0: endif michael@0: endif michael@0: endif michael@0: michael@0: michael@0: $(OBJDIR)/%.$(OBJ_SUFFIX): %.s michael@0: @$(MAKE_OBJDIR) michael@0: $(AS) -o $@ $(ASFLAGS) -c $< michael@0: michael@0: %.i: %.c michael@0: $(CC) -C -E $(CFLAGS) $< > $*.i michael@0: michael@0: %: %.pl michael@0: rm -f $@; cp $< $@; chmod +x $@ michael@0: michael@0: # michael@0: # HACK ALERT michael@0: # michael@0: # The only purpose of this rule is to pass Mozilla's Tinderbox depend michael@0: # builds (http://tinderbox.mozilla.org/showbuilds.cgi). Mozilla's michael@0: # Tinderbox builds NSPR continuously as part of the Mozilla client. michael@0: # Because NSPR's make depend is not implemented, whenever we change michael@0: # an NSPR header file, the depend build does not recompile the NSPR michael@0: # files that depend on the header. michael@0: # michael@0: # This rule makes all the objects depend on a dummy header file. michael@0: # Touch this dummy header file to force the depend build to recompile michael@0: # everything. michael@0: # michael@0: # This rule should be removed when make depend is implemented. michael@0: # michael@0: michael@0: DUMMY_DEPEND_H = $(topsrcdir)/config/prdepend.h michael@0: michael@0: $(filter $(OBJDIR)/%.$(OBJ_SUFFIX),$(OBJS)): $(OBJDIR)/%.$(OBJ_SUFFIX): $(DUMMY_DEPEND_H) michael@0: michael@0: # END OF HACK michael@0: michael@0: ################################################################################ michael@0: # Special gmake rules. michael@0: ################################################################################ michael@0: michael@0: # michael@0: # Disallow parallel builds with MSVC < 8 since it can't open the PDB file in michael@0: # parallel. michael@0: # michael@0: ifeq (,$(filter-out 1200 1300 1310,$(MSC_VER))) michael@0: .NOTPARALLEL: michael@0: endif michael@0: michael@0: # michael@0: # Re-define the list of default suffixes, so gmake won't have to churn through michael@0: # hundreds of built-in suffix rules for stuff we don't need. michael@0: # michael@0: .SUFFIXES: michael@0: .SUFFIXES: .a .$(OBJ_SUFFIX) .c .cpp .s .h .i .pl michael@0: michael@0: # michael@0: # Fake targets. Always run these rules, even if a file/directory with that michael@0: # name already exists. michael@0: # michael@0: .PHONY: all alltags clean export install libs realclean release michael@0: michael@0: # michael@0: # List the target pattern of an implicit rule as a dependency of the michael@0: # special target .PRECIOUS to preserve intermediate files made by michael@0: # implicit rules whose target patterns match that file's name. michael@0: # (See GNU Make documentation, Edition 0.51, May 1996, Sec. 10.4, michael@0: # p. 107.) michael@0: # michael@0: .PRECIOUS: $(OBJDIR)/%.$(OBJ_SUFFIX)