From: Michal H. <ms...@gm...> - 2008-08-22 19:54:50
|
All makefiles which produce static library should provide also staticlib target so they can be used in the same way. xpdf makefiles didn't use TARGET variable (like kernel, utils, gui), so they have been updated to follow this convention. Index: src/utils/Makefile =================================================================== --- src/utils/Makefile.orig 2008-08-19 21:01:34.000000000 -0600 +++ src/utils/Makefile 2008-08-22 10:06:11.000000000 -0600 @@ -40,6 +40,9 @@ $(TARGET): deps $(BINS) $(AR) $(TARGET) $(BINS) $(RANLIB) $(TARGET) +.PHONY: staticlib +staticlib: $(TARGET) + .PHONY: clean distclean clean: $(DEL_FILE) $(BINS) deps Index: src/xpdf/Makefile.in =================================================================== --- src/xpdf/Makefile.in.orig 2008-08-19 21:01:34.000000000 -0600 +++ src/xpdf/Makefile.in 2008-08-22 10:06:11.000000000 -0600 @@ -13,11 +13,14 @@ REL_ADDR = ../../ include $(REL_ADDR)/Makefile.rules all: libxpdf + +staticlib: libxpdf + libxpdf: cd goo && $(MAKE) cd fofi && $(MAKE) cd splash && $(MAKE) - cd xpdf && $(MAKE) libxpdf + cd xpdf && $(MAKE) staticlib clean: -cd goo && $(MAKE) clean || true Index: src/Makefile =================================================================== --- src/Makefile.orig 2008-08-19 21:01:34.000000000 -0600 +++ src/Makefile 2008-08-22 10:09:18.000000000 -0600 @@ -13,7 +13,7 @@ all: kernel tests $(GUI_TARGET) # XPdf xpdf: - cd $(XPDFROOT) && $(MAKE) libxpdf + cd $(XPDFROOT) && $(MAKE) staticlib # PDF editor pdfedit: utils kernel xpdf qoutputdevices qsa $(GUIROOT)/Makefile.qt @@ -55,7 +55,7 @@ $(QOUTPUTDEVROOT)/Makefile.qt: $(QOUTPUT # Utils utils: xpdf - cd $(UTILSROOT) && $(MAKE) + cd $(UTILSROOT) && $(MAKE) staticlib #QSA qsa: $(QSAROOT)/Makefile.qsa @@ -66,7 +66,7 @@ $(QSAROOT)/Makefile.qsa: $(QSAROOT)/qsa. # Kernel kernel: xpdf utils - cd $(KERNELROOT) && $(MAKE) + cd $(KERNELROOT) && $(MAKE) staticlib # kernel tests tests: kernel Index: src/xpdf/fofi/Makefile.in =================================================================== --- src/xpdf/fofi/Makefile.in.orig 2008-08-19 21:01:34.000000000 -0600 +++ src/xpdf/fofi/Makefile.in 2008-08-22 10:06:11.000000000 -0600 @@ -27,7 +27,10 @@ HEADERS = \ FoFiType1C.h \ #------------------------------------------------------------------------ -all: $(LIBPREFIX)fofi.a +TARGET = $(LIBPREFIX)fofi.a +all: $(TARGET) + +staticlib: $(TARGET) #------------------------------------------------------------------------ @@ -38,15 +41,15 @@ FOFI_OBJS = \ FoFiType1.o \ FoFiType1C.o -$(LIBPREFIX)fofi.a: deps $(FOFI_OBJS) - $(DEL_FILE) $(LIBPREFIX)fofi.a - $(AR) $(LIBPREFIX)fofi.a $(FOFI_OBJS) - $(RANLIB) $(LIBPREFIX)fofi.a +$(TARGET): deps $(FOFI_OBJS) + $(DEL_FILE) $(TARGET) + $(AR) $(TARGET) $(FOFI_OBJS) + $(RANLIB) $(TARGET) #------------------------------------------------------------------------ clean: - $(DEL_FILE) $(FOFI_OBJS) $(LIBPREFIX)fofi.a deps + $(DEL_FILE) $(FOFI_OBJS) $(TARGET) deps #------------------------------------------------------------------------ Index: src/xpdf/goo/Makefile.in =================================================================== --- src/xpdf/goo/Makefile.in.orig 2008-08-19 21:01:34.000000000 -0600 +++ src/xpdf/goo/Makefile.in 2008-08-22 10:06:11.000000000 -0600 @@ -35,23 +35,25 @@ HEADERS = \ parseargs.h\ #------------------------------------------------------------------------ -all: $(LIBPREFIX)Goo.a +TARGET = $(LIBPREFIX)Goo.a +all: $(TARGET) +staticlib: $(TARGET) #------------------------------------------------------------------------ GOO_CXX_OBJS = GHash.o GList.o GString.o gmem.o gmempp.o gfile.o FixedPoint.o GOO_C_OBJS = parseargs.o GOO_OBJS = $(GOO_CXX_OBJS) $(GOO_C_OBJS) -$(LIBPREFIX)Goo.a: deps_cxx deps_c $(GOO_OBJS) - $(DEL_FILE) $(LIBPREFIX)Goo.a - $(AR) $(LIBPREFIX)Goo.a $(GOO_OBJS) - $(RANLIB) $(LIBPREFIX)Goo.a +$(TARGET): deps_cxx deps_c $(GOO_OBJS) + $(DEL_FILE) $(TARGET) + $(AR) $(TARGET) $(GOO_OBJS) + $(RANLIB) $(TARGET) #------------------------------------------------------------------------ clean: - $(DEL_FILE) $(GOO_OBJS) $(LIBPREFIX)Goo.a deps_cxx deps_c + $(DEL_FILE) $(GOO_OBJS) $(TARGET) deps_cxx deps_c #------------------------------------------------------------------------ Index: src/xpdf/splash/Makefile.in =================================================================== --- src/xpdf/splash/Makefile.in.orig 2008-08-19 21:01:34.000000000 -0600 +++ src/xpdf/splash/Makefile.in 2008-08-22 10:06:11.000000000 -0600 @@ -58,11 +58,6 @@ HEADERS = \ SplashXPathScanner.h\ #------------------------------------------------------------------------ - -all: $(LIBPREFIX)splash.a - -#------------------------------------------------------------------------ - SPLASH_OBJS = \ Splash.o \ SplashBitmap.o \ @@ -84,15 +79,20 @@ SPLASH_OBJS = \ SplashXPath.o \ SplashXPathScanner.o -$(LIBPREFIX)splash.a: deps $(SPLASH_OBJS) - $(DEL_FILE) $(LIBPREFIX)splash.a - $(AR) $(LIBPREFIX)splash.a $(SPLASH_OBJS) - $(RANLIB) $(LIBPREFIX)splash.a +TARGET = $(LIBPREFIX)splash.a +all: $(TARGET) + +staticlib: all + +$(TARGET): deps $(SPLASH_OBJS) + $(DEL_FILE) $(TARGET) + $(AR) $(TARGET) $(SPLASH_OBJS) + $(RANLIB) $(TARGET) #------------------------------------------------------------------------ clean: - $(DEL_FILE) $(SPLASH_OBJS) $(LIBPREFIX)splash.a deps + $(DEL_FILE) $(SPLASH_OBJS) $(TARGET) deps #------------------------------------------------------------------------ Index: src/xpdf/xpdf/Makefile.in =================================================================== --- src/xpdf/xpdf/Makefile.in.orig 2008-08-19 21:01:34.000000000 -0600 +++ src/xpdf/xpdf/Makefile.in 2008-08-22 10:06:11.000000000 -0600 @@ -165,12 +165,15 @@ UnicodeTypeTable.o \ XRef.o \ XpdfPluginAPI.o -libxpdf: $(LIBPREFIX)xpdf.a +TARGET = $(LIBPREFIX)xpdf.a +libxpdf: $(TARGET) -$(LIBPREFIX)xpdf.a: deps $(LIBXPDF_OBJS) - $(DEL_FILE) $(LIBPREFIX)xpdf.a - $(AR) $(LIBPREFIX)xpdf.a $(LIBXPDF_OBJS) - $(RANLIB) $(LIBPREFIX)xpdf.a +staticlib: libxpdf + +$(TARGET): deps $(LIBXPDF_OBJS) + $(DEL_FILE) $(TARGET) + $(AR) $(TARGET) $(LIBXPDF_OBJS) + $(RANLIB) $(TARGET) #------------------------------------------------------------------------ @@ -182,7 +185,7 @@ SecurityHandler.x.o: SecurityHandler.cc clean: $(DEL_FILE) *.o - $(DEL_FILE) $(LIBPREFIX)xpdf.a deps + $(DEL_FILE) $(TARGET) deps #------------------------------------------------------------------------ -- Michal Hocko |