mingw-filesystem/mingw32-macros.mingw32

133 lines
5.3 KiB
Plaintext
Raw Normal View History

2008-10-30 09:49:17 +00:00
# RPM macros for Fedora MinGW.
%_mingw32_target i686-pc-mingw32
2008-10-30 09:49:17 +00:00
# Paths.
%_mingw32_sysroot %{_prefix}/%{_mingw32_target}/sys-root
2008-10-30 09:49:17 +00:00
%_mingw32_prefix %{_mingw32_sysroot}/mingw
%_mingw32_exec_prefix %{_mingw32_prefix}
%_mingw32_bindir %{_mingw32_exec_prefix}/bin
%_mingw32_sbindir %{_mingw32_exec_prefix}/sbin
%_mingw32_libexecdir %{_mingw32_exec_prefix}/libexec
%_mingw32_libdir %{_mingw32_exec_prefix}/lib
2008-10-30 09:49:17 +00:00
%_mingw32_datadir %{_mingw32_prefix}/share
%_mingw32_docdir %{_mingw32_prefix}/share/doc
%_mingw32_infodir %{_mingw32_prefix}/share/info
%_mingw32_mandir %{_mingw32_prefix}/share/man
%_mingw32_sysconfdir %{_mingw32_prefix}/etc
%_mingw32_sharedstatedir %{_mingw32_prefix}/com
%_mingw32_localstatedir %{_mingw32_prefix}/var
2008-10-30 09:49:17 +00:00
%_mingw32_includedir %{_mingw32_prefix}/include
# Build macros.
%_mingw32_host %{_mingw32_target}
2008-10-30 09:49:17 +00:00
%_mingw32_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields
2008-10-30 09:49:17 +00:00
%_mingw32_cc %{_mingw32_target}-gcc
%_mingw32_cxx %{_mingw32_target}-g++
%_mingw32_cpp %{_mingw32_target}-gcc -E
%_mingw32_addr2line %{_mingw32_target}-addr2line
%_mingw32_ar %{_mingw32_target}-ar
%_mingw32_as %{_mingw32_target}-as
%_mingw32_c++ %{_mingw32_target}-c++
%_mingw32_c++filt %{_mingw32_target}-c++filt
%_mingw32_dlltool %{_mingw32_target}-dlltool
%_mingw32_dllwrap %{_mingw32_target}-dllwrap
%_mingw32_gcov %{_mingw32_target}-gcov
%_mingw32_gprof %{_mingw32_target}-gprof
%_mingw32_ld %{_mingw32_target}-ld
%_mingw32_nm %{_mingw32_target}-nm
%_mingw32_objcopy %{_mingw32_target}-objcopy
%_mingw32_objdump %{_mingw32_target}-objdump
%_mingw32_ranlib %{_mingw32_target}-ranlib
%_mingw32_readelf %{_mingw32_target}-readelf
%_mingw32_size %{_mingw32_target}-size
%_mingw32_strings %{_mingw32_target}-strings
%_mingw32_strip %{_mingw32_target}-strip
%_mingw32_windmc %{_mingw32_target}-windmc
%_mingw32_windres %{_mingw32_target}-windres
2008-10-30 09:49:17 +00:00
%_mingw32_cache mingw32-config.cache
2008-10-30 09:49:17 +00:00
%_mingw32_findprovides /usr/lib/rpm/mingw32-find-provides.sh
%_mingw32_findrequires /usr/lib/rpm/mingw32-find-requires.sh
%_mingw32_env HOST_CC=gcc; export HOST_CC; \
PKG_CONFIG_LIBDIR="%{_mingw32_libdir}/pkgconfig"; export PKG_CONFIG_LIBDIR; \
_PREFIX="%{_bindir}/%{_mingw32_target}-"; \
for i in `ls -1 ${_PREFIX}* | grep -v 'gcc-'`; do \
x=`echo $i|sed "s,${_PREFIX},,"|tr "a-z+-" "A-ZX_"`; \
declare -x $x="$i" ; export $x; \
done; \
unset _PREFIX; \
CC="${MINGW32_CC:-%_mingw32_cc}"; export CC; \
CFLAGS="${MINGW32_CFLAGS:-%_mingw32_cflags}"; export CFLAGS; \
if [ -x "%{_bindir}/%{_mingw32_cxx}" ]; then \
CXX="${MINGW32_CXX:-%_mingw32_cxx}"; export CXX; \
CXXFLAGS="${MINGW32_CXXFLAGS:-%_mingw32_cflags}"; export CXXFLAGS; \
else \
CXX=; export CXX; \
ac_cv_prog_CXX=no; export ac_cv_prog_CXX; \
CXXFLAGS=; export CXXFLAGS; \
fi; \
for i in `ls %{_mingw32_bindir}/*|grep -- "-config\$"` ; do \
x=`basename $i|tr "a-z+-" "A-ZX_"`; \
declare -x $x="$i" ; export $x; \
done; \
unset x i
%_mingw32_configure %{_mingw32_env} ; \
./configure --cache-file=%{_mingw32_cache} \\\
--host=%{_mingw32_host} \\\
--build=%_build \\\
--target=%{_mingw32_target} \\\
--prefix=%{_mingw32_prefix} \\\
--exec-prefix=%{_mingw32_exec_prefix} \\\
--bindir=%{_mingw32_bindir} \\\
--sbindir=%{_mingw32_sbindir} \\\
--sysconfdir=%{_mingw32_sysconfdir} \\\
--datadir=%{_mingw32_datadir} \\\
--includedir=%{_mingw32_includedir} \\\
--libdir=%{_mingw32_libdir} \\\
--libexecdir=%{_mingw32_libexecdir} \\\
--localstatedir=%{_mingw32_localstatedir} \\\
--sharedstatedir=%{_mingw32_sharedstatedir} \\\
--mandir=%{_mingw32_mandir} \\\
--infodir=%{_mingw32_infodir}
%_mingw32_make %{_mingw32_env} ; \
2008-12-18 10:53:30 +00:00
make \\\
prefix=%{_mingw32_prefix} \\\
exec_prefix=%{_mingw32_exec_prefix} \\\
bindir=%{_mingw32_bindir} \\\
sbindir=%{_mingw32_sbindir} \\\
sysconfdir=%{_mingw32_sysconfdir} \\\
datadir=%{_mingw32_datadir} \\\
includedir=%{_mingw32_includedir} \\\
libdir=%{_mingw32_libdir} \\\
libexecdir=%{_mingw32_libexecdir} \\\
localstatedir=%{_mingw32_localstatedir} \\\
sharedstatedir=%{_mingw32_sharedstatedir} \\\
mandir=%{_mingw32_mandir} \\\
infodir=%{_mingw32_infodir}
%_mingw32_makeinstall %{_mingw32_env} ; \
make \\\
prefix=%{?buildroot:%{buildroot}}%{_mingw32_prefix} \\\
exec_prefix=%{?buildroot:%{buildroot}}%{_mingw32_exec_prefix} \\\
bindir=%{?buildroot:%{buildroot}}%{_mingw32_bindir} \\\
sbindir=%{?buildroot:%{buildroot}}%{_mingw32_sbindir} \\\
sysconfdir=%{?buildroot:%{buildroot}}%{_mingw32_sysconfdir} \\\
datadir=%{?buildroot:%{buildroot}}%{_mingw32_datadir} \\\
includedir=%{?buildroot:%{buildroot}}%{_mingw32_includedir} \\\
libdir=%{?buildroot:%{buildroot}}%{_mingw32_libdir} \\\
libexecdir=%{?buildroot:%{buildroot}}%{_mingw32_libexecdir} \\\
localstatedir=%{?buildroot:%{buildroot}}%{_mingw32_localstatedir} \\\
sharedstatedir=%{?buildroot:%{buildroot}}%{_mingw32_sharedstatedir} \\\
mandir=%{?buildroot:%{buildroot}}%{_mingw32_mandir} \\\
2008-12-18 10:53:30 +00:00
infodir=%{?buildroot:%{buildroot}}%{_mingw32_infodir} \\\
install