diff options
author | Yaakov Selkowitz <yselkowi@redhat.com> | 2012-10-24 14:15:27 +0400 |
---|---|---|
committer | Yaakov Selkowitz <yselkowi@redhat.com> | 2012-10-24 14:15:27 +0400 |
commit | 7c61aa7ece02fa6a32957831c898d2d5e50264e4 (patch) | |
tree | 8d2594123472fb7a873ffe5e6c25297accbc448f /winsup/utils/Makefile.in | |
parent | 478bb995fbe19378990974bedcf5d5582d7a49c3 (diff) |
* configure.in: Add check for MINGW_CXX. Remove libiconv check.
* configure: Regenerate.
* Makefile.in: Remove references to mingw and w32api directories.
Use MINGW_CXX instead of mingw script to build MINGW_BINS.
Check for libiconv with $CC --print-file-name.
* cygcheck.cc: Use relative include paths for Cygwin headers.
* path.cc: Ditto.
* strace.cc: Ditto
* mingw: Remove.
Diffstat (limited to 'winsup/utils/Makefile.in')
-rw-r--r-- | winsup/utils/Makefile.in | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in index 12f118903..f7308fcde 100644 --- a/winsup/utils/Makefile.in +++ b/winsup/utils/Makefile.in @@ -40,15 +40,11 @@ include $(srcdir)/../Makefile.common .NOEXPORT: .PHONY: all install clean realclean warn_dumper warn_cygcheck_zlib -ALL_LDLIBS := -lnetapi32 -ladvapi32 -ALL_LDFLAGS := -static-libgcc -Wl,--enable-auto-import -B$(newlib_build)/libc -B$(w32api_lib) $(LDFLAGS) $(ALL_LDLIBS) -ALL_DEP_LDLIBS := $(cygwin_build)/libcygwin.a ${patsubst -l%,\ - $(w32api_lib)/lib%.a,$(ALL_LDLIBS) -lkernel32 -luser32} +ALL_LDLIBS := -lnetapi32 -ladvapi32 -lkernel32 -luser32 +ALL_LDFLAGS := -static-libgcc -Wl,--enable-auto-import -B$(newlib_build)/libc $(LDFLAGS) $(ALL_LDLIBS) +ALL_DEP_LDLIBS := $(cygwin_build)/libcygwin.a -MINGW_LIB := $(mingw_build)/libmingw32.a -MINGW_LDLIBS := $(ALL_LDLIBS) $(MINGW_LIB) -MINGW_DEP_LDLIBS := $(ALL_DEP_LDLIBS) $(MINGW_LIB) -MINGW_CXX := ${srcdir}/mingw ${CXX} -I${updir} +MINGW_CXX := @MINGW_CXX@ # List all binaries to be linked in Cygwin mode. Each binary on this list # must have a corresponding .o of the same name. @@ -74,7 +70,8 @@ path-mount.o: path.cc mount.exe: path-mount.o # Provide any necessary per-target variable overrides. -cygcheck.exe: MINGW_LDFLAGS += -B{w32api_lib} -lpsapi -lntdll -lmsvcrt +cygcheck.exe: MINGW_CXXFLAGS += -idirafter $(cygwin_source)/include -idirafter $(newlib_source)/libc/include +cygcheck.exe: MINGW_LDFLAGS += -lpsapi -lntdll cygpath.exe: ALL_LDFLAGS += -lcygwin -luserenv -lntdll cygpath.exe: CXXFLAGS += -fno-threadsafe-statics ps.exe: ALL_LDFLAGS += -lcygwin -lpsapi -lntdll @@ -83,21 +80,20 @@ strace.exe: MINGW_LDFLAGS += -lntdll ldd.exe: ALL_LDFLAGS += -lpsapi pldd.exe: ALL_LDFLAGS += -lpsapi -ldh.exe: MINGW_LDLIBS := ldh.exe: MINGW_LDFLAGS := -nostdlib -lkernel32 # Check for dumper's requirements and enable it if found. -LIBICONV := @libiconv@ +libiconv := ${shell $(CC) --print-file-name=libiconv.a} libbfd := ${shell $(CC) -B$(bupdir2)/bfd/ --print-file-name=libbfd.a} libintl := ${shell $(CC) -B$(bupdir2)/intl/ --print-file-name=libintl.a} bfdlink := $(shell ${CC} -xc /dev/null -o /dev/null -c -B${bupdir2}/bfd/ -include bfd.h 2>&1) -build_dumper := ${shell test -r $(libbfd) -a -r $(libintl) -a -n "$(LIBICONV)" -a -z "${bfdlink}" && echo 1} +build_dumper := ${shell test -r $(libbfd) -a -r $(libintl) -a -n "$(libiconv)" -a -z "${bfdlink}" && echo 1} ifdef build_dumper CYGWIN_BINS += dumper.exe dumper.o module_info.o parse_pe.o: CXXFLAGS += -I$(bupdir2)/bfd -I$(updir1)/include dumper.o parse_pe.o: dumper.h dumper.exe: module_info.o parse_pe.o -dumper.exe: ALL_LDFLAGS += ${libbfd} ${libintl} -L$(bupdir1)/libiberty $(LIBICONV) -liberty -lz +dumper.exe: ALL_LDFLAGS += ${libbfd} ${libintl} -L$(bupdir1)/libiberty $(libiconv) -liberty -lz else all: warn_dumper endif @@ -105,7 +101,7 @@ endif # Check for availability of a MinGW libz and enable for cygcheck. libz:=${shell x=$$(${MINGW_CXX} --print-file-name=libz.a); cd $$(dirname $$x); dir=$$(pwd); case "$$dir" in *mingw*) echo $$dir/libz.a ;; esac} ifdef libz -zlib_h := -include ${patsubst %/lib/mingw/libz.a,%/include/zlib.h,${patsubst %/lib/libz.a,%/include/zlib.h,$(libz)}} +zlib_h := -include ${patsubst %/lib/libz.a,%/include/zlib.h,$(libz)} zconf_h := ${patsubst %/zlib.h,%/zconf.h,$(zlib_h)} dump_setup.o: MINGW_CXXFLAGS += $(zconf_h) $(zlib_h) cygcheck.exe: MINGW_LDFLAGS += $(libz) @@ -160,7 +156,7 @@ endif # note: how to compile a Cygwin object is covered by the pattern rule in Makefile.common # these dependencies ensure that the required in-tree libs are built first -$(MINGW_BINS): $(MINGW_DEP_LDLIBS) +$(MINGW_BINS): $(ALL_DEP_LDLIBS) $(CYGWIN_BINS): $(ALL_DEP_LDLIBS) clean: @@ -179,9 +175,6 @@ install: all $(cygwin_build)/libcygwin.a: $(cygwin_build)/Makefile @$(MAKE) -C $(@D) $(@F) -$(MINGW_LIB): $(mingw_build)/Makefile - @$(MAKE) -C $(@D) $(@F) - warn_dumper: @echo '*** Not building dumper.exe since some required libraries or' @echo '*** or headers are missing. Potential candidates are:' |