# /etc/pkgmk.conf: pkgmk(8) configuration
#
-export CFLAGS="-O2 -march=i686 -pipe"
-export CXXFLAGS="-O2 -march=i686 -pipe"
+export CFLAGS="-O2 -march=x86-64 -pipe"
+export CXXFLAGS="${CFLAGS}"
+
+case ${PKGMK_ARCH} in
+ "64")
+ ;;
+ "32")
+ export CFLAGS="${CFLAGS} -m32"
+ export CXXFLAGS="${CXXFLAGS} -m32"
+ export LDFLAGS="${LDFLAGS} -m32"
+ export PKG_CONFIG_LIBDIR="/usr/lib32/pkgconfig"
+ ;;
+ *)
+ echo "Unknown architecture selected! Exiting."
+ exit 1
+ ;;
+esac
# PKGMK_SOURCE_MIRRORS=()
# PKGMK_SOURCE_DIR="$PWD"