[csw-devel] SF.net SVN: gar:[10354] csw/mgar/pkg/xpm/trunk/Makefile
theferret at users.sourceforge.net
theferret at users.sourceforge.net
Mon Jun 28 05:33:35 CEST 2010
Revision: 10354
http://gar.svn.sourceforge.net/gar/?rev=10354&view=rev
Author: theferret
Date: 2010-06-28 03:33:35 +0000 (Mon, 28 Jun 2010)
Log Message:
-----------
xpm: makefile tweak
Modified Paths:
--------------
csw/mgar/pkg/xpm/trunk/Makefile
Modified: csw/mgar/pkg/xpm/trunk/Makefile
===================================================================
--- csw/mgar/pkg/xpm/trunk/Makefile 2010-06-28 03:12:03 UTC (rev 10353)
+++ csw/mgar/pkg/xpm/trunk/Makefile 2010-06-28 03:33:35 UTC (rev 10354)
@@ -1,36 +1,40 @@
-#This Makefile originally generated from a template under
-# pkg/TEMPLATES/createpkg
-# You will most likely have to use GNU make to use it.
+# Eventually, move "Makefile.sparc" to here, and make it
+# generic 64bit capable.?
+# you MUST build this with gnu make, unfortunately.
+# Mainly just because of the ARCH expansion
+# Organization: variable defintions up top,
+# targets in second half.
-#Uncomment one of these definitions. The -b invokation,
-# is suitable for use with small packages, where you want to have a few files
-# in your top level src directory. It is also suitable for
-# "relocateable" packages. see the createpkg docs for more details.
-#CREATEPKG=createpkg -b `pwd`
-CREATEPKG=createpkg -r `pwd`/build/*/cswstage
+ARCH := $(shell /bin/uname -p)
+LDFLAGS_COMMON :=
-BUILDDIR=build/libXpm*
+SRCDIR= build/*
+# DO NOT specify the arch-blah stuff such as -m64 here.
+# the individual targets will do that.
-## hax for sparcv9
-RAWLIB=libXpm.so.4.11.0
-XPM_PC=build/libXpm-3.5.8/cswstage/opt/csw/lib/pkgconfig/xpm.pc
+CFLAGS_COMMON := -mt -xnorunpath
+CXXFLAGS_COMMON := -mt -norunpath
+# Keep this arch-neutral if possible. add arch-specific tweaks
+# to arch-specific target
+CONFIGURE=./configure --prefix=/opt/csw --disable-static
-STDFILES=pkginfo copyright prototype
-FILES=
+CONFIGURE_64_EXTRAS:= --libdir=/opt/csw/lib/64 --libexecdir=/opt/csw/libexec/sparcv9
-all: build
+all: $(ARCH)-32 $(ARCH)-64 package
+# ARCH-XX handles configure, build, and stage for its own combo
+#
-build: build/.config.done
- (cd $(BUILDDIR) ; \
- $(MAKE) ; \
- stagepkg )
+clean distclean:
+ $(MAKE) -C $(SRCDIR) $@
+<<<<<<< .mine
+=======
sparcv9:
(cd $(BUILDDIR)/src ; \
gmake clean; \
@@ -40,38 +44,70 @@
cp .libs/$(RAWLIB) ../cswstage ; cd .. ;\
sed 's:libdir=.*:/opt/csw/lib/sparcv9:' xpm.pc>cswstage/xpm.pc.sparcv9 ; \
echo sparcv9 build done )
+>>>>>>> .r10271
-hack:
- ( cd $(BUILDDIR) ; \
- sed 's:libdir=.*:/opt/csw/lib/sparcv9:' xpm.pc>cswstage/xpm.pc.sparcv9 )
+package patch garchive:
+ @echo make $@ not implemented yet
+ ### potentially want to handle "merge" type stuff in 'package'
+ # we also want to handle multi-package thingies.
-
-# dummy target for configure
-build/.config.done:
- (cd $(BUILDDIR) ; \
- test -f ../../patchfile.preconf && \
- gpatch -p0 <../../patchfile.preconf ; \
- ./configure --prefix=/opt/csw --enable-static=no ; \
- test -f ../../patchfile.postconf && \
- gpatch -p0 <../../patchfile.postconf )
- touch build/.config.done
+# initial announce here. more down below for individual targets
+sparc-32 sparc-64 i386-32 i386-64::
+ @echo Building $@ target
-# I tried depending this on $(BUILDDIR)/config.log but that didnt stick
-configure: build/.config.done
-package: $(STDFILE) $(FILES)
- @echo Building package for `uname -p`
- $(CREATEPKG)
+configure-$(ARCH)-32: build/.configure-$(ARCH)-32.done
+ @echo $@ done
+build-$(ARCH)-32: build/.build-$(ARCH)-32.done
+ @echo $@ done
+stage-$(ARCH)-32: build/.stage-$(ARCH)-32.done
+ @echo $@ done
+configure-$(ARCH)-64: build/.configure-$(ARCH)-64.done
+ @echo $@ done
+build-$(ARCH)-64: build/.build-$(ARCH)-64.done
+ @echo $@ done
+stage-$(ARCH)-64: build/.stage-$(ARCH)-64.done
+ @echo $@ done
+# split out generic $(ARCH) sections to specific platform if needed.
+# but it usually should not be.
-pkgclean:
- rm -f *.pkg.gz package
+build/.$(ARCH)-32.done: $(ARCH)-32
-clean: pkgclean
- cd $(BUILDDIR) && make clean
-reallyclean: clean
- rm -f $BUILDDIR/config.log $BUILDDIR/config.cache $BUILDDIR/config.status
- rm -f build/.config.done
+build/.stage-$(ARCH)-32.done \
+build/.stage-$(ARCH)-64.done ::
+ @echo debug: handling $@ target
+ touch $@
+
+build/.configure-$(ARCH)-32.done::
+ (cd $(SRCDIR) ; \
+ CFLAGS="$(CFLAGS_COMMON)" \
+ CXXFLAGS="$(CXXFLAGS_COMMON)" \
+ $(CONFIGURE) )
+ touch $@
+
+build/.configure-$(ARCH)-64.done::
+ (cd $(SRCDIR) ; \
+ CFLAGS="$(CFLAGS_COMMON) -m64" \
+ CXXFLAGS="$(CXXFLAGS_COMMON) -m64" \
+ PKG_CONFIG_PATH=/opt/csw/lib/sparcv9 \
+ $(CONFIGURE) $(CONFIGURE_64_EXTRAS) )
+ touch $@
+
+
+build/.build-$(ARCH)-32.done build/.build-$(ARCH)-64.done::
+ (cd $(SRCDIR) ; \
+ $(MAKE) $(MFLAGS) )
+ touch $@
+
+$(ARCH)-32 :: configure-$(ARCH)-32 build-$(ARCH)-32 stage-$(ARCH)-32
+ @echo Completed $(ARCH)-32 configure, build and stage
+ touch build/.$(ARCH)-32.done
+
+
+$(ARCH)-64 :: stage-$(ARCH)-32 configure-$(ARCH)-64 build-$(ARCH)-64 stage-$(ARCH)-64
+ @echo Completed $@ configure, build and stage
+ touch build/.$(ARCH)-64.done
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list