diff options
| author | Peter Eisentraut | 2010-11-12 20:15:16 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2010-11-12 20:15:16 +0000 |
| commit | 19e231bbdaef792dce22100012b504e2fb72f971 (patch) | |
| tree | 011823e7b1b882972eaff7c4f3a6b18571030e4a /src/Makefile.shlib | |
| parent | d6754f67b08ad6a05640fc5d9d97c6f225512ea0 (diff) | |
Improved parallel make support
Replace for loops in makefiles with proper dependencies. Parallel
make can now span across directories. Also, make -k and make -q work
properly.
GNU make 3.80 or newer is now required.
Diffstat (limited to 'src/Makefile.shlib')
| -rw-r--r-- | src/Makefile.shlib | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Makefile.shlib b/src/Makefile.shlib index 3e5387fb71..b6dea47f90 100644 --- a/src/Makefile.shlib +++ b/src/Makefile.shlib @@ -22,6 +22,7 @@ # OBJS List of object files to include in library # SHLIB_LINK If shared library relies on other libraries, # additional stuff to put in its link command +# SHLIB_PREREQS Order-only prerequisites for library build target # SHLIB_EXPORTS (optional) Name of file containing list of symbols to # export, in the format "function_name number" # @@ -340,7 +341,7 @@ all-static-lib: $(stlib) all-shared-lib: $(shlib) ifndef haslibarule -$(stlib): $(OBJS) +$(stlib): $(OBJS) | $(SHLIB_PREREQS) $(LINK.static) $@ $^ $(RANLIB) $@ endif #haslibarule @@ -351,7 +352,7 @@ ifeq (,$(filter cygwin win32,$(PORTNAME))) ifneq ($(PORTNAME), aix) # Normal case -$(shlib): $(OBJS) +$(shlib): $(OBJS) | $(SHLIB_PREREQS) $(LINK.shared) -o $@ $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) ifdef shlib_major # If we're using major and minor versions, then make a symlink to major-version-only. @@ -382,7 +383,7 @@ endif else # PORTNAME == aix # AIX case -$(shlib) $(stlib): $(OBJS) +$(shlib) $(stlib): $(OBJS) | $(SHLIB_PREREQS) $(LINK.static) $(stlib) $^ $(RANLIB) $(stlib) $(MKLDEXPORT) $(stlib) >$(exports_file) @@ -408,10 +409,10 @@ else DLL_DEFFILE = lib$(NAME)dll.def endif -$(shlib): $(OBJS) $(DLL_DEFFILE) +$(shlib): $(OBJS) $(DLL_DEFFILE) | $(SHLIB_PREREQS) $(DLLWRAP) -o $@ --dllname $(shlib) $(DLLWRAP_FLAGS) --def $(DLL_DEFFILE) $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) -$(stlib): $(shlib) $(DLL_DEFFILE) +$(stlib): $(shlib) $(DLL_DEFFILE) | $(SHLIB_PREREQS) $(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(DLL_DEFFILE) --output-lib $@ endif # PORTNAME == cygwin || PORTNAME == win32 |
