mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-31 00:23:56 +00:00
Make the kconfig stuff build under Cygwin.
/trunk/kconfig/kconfig.mk | 7 5 2 0 ++++-- /trunk/kconfig/lxdialog/check-lxdialog.sh | 44 21 23 0 ++++++++++++++++++------------------- 2 files changed, 26 insertions(+), 25 deletions(-)
This commit is contained in:
parent
d09d633fb2
commit
145d0cad94
@ -82,6 +82,9 @@ mconf_OBJ = $(patsubst %.c,%.o,$(mconf_SRC))
|
|||||||
mconf_DEP = $(patsubst %.c,%.dep,$(mconf_SRC))
|
mconf_DEP = $(patsubst %.c,%.dep,$(mconf_SRC))
|
||||||
$(mconf_OBJ) $(mconf_DEP): CFLAGS += $(NCURSES_CFLAGS) $(INTL_CFLAGS)
|
$(mconf_OBJ) $(mconf_DEP): CFLAGS += $(NCURSES_CFLAGS) $(INTL_CFLAGS)
|
||||||
$(obj)/mconf: LDFLAGS += $(NCURSES_LDFLAGS)
|
$(obj)/mconf: LDFLAGS += $(NCURSES_LDFLAGS)
|
||||||
|
ifeq ($(shell uname -o 2>/dev/null || echo unknown),Cygwin)
|
||||||
|
$(obj)/mconf: LDFLAGS += -Wl,--enable-auto-import
|
||||||
|
endif
|
||||||
|
|
||||||
# These are generated files:
|
# These are generated files:
|
||||||
ALL_OBJS = $(sort $(COMMON_OBJ) $(LX_OBJ) $(conf_OBJ) $(mconf_OBJ))
|
ALL_OBJS = $(sort $(COMMON_OBJ) $(LX_OBJ) $(conf_OBJ) $(mconf_OBJ))
|
||||||
@ -139,11 +142,11 @@ endef
|
|||||||
# Actual link
|
# Actual link
|
||||||
$(obj)/mconf: $(COMMON_OBJ) $(LX_OBJ) $(mconf_OBJ)
|
$(obj)/mconf: $(COMMON_OBJ) $(LX_OBJ) $(mconf_OBJ)
|
||||||
@$(ECHO) ' LD $@'
|
@$(ECHO) ' LD $@'
|
||||||
$(SILENT)$(HOST_LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -o $@ $^
|
$(SILENT)$(HOST_LD) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS)
|
||||||
|
|
||||||
$(obj)/conf: $(COMMON_OBJ) $(conf_OBJ)
|
$(obj)/conf: $(COMMON_OBJ) $(conf_OBJ)
|
||||||
@$(ECHO) ' LD $@'
|
@$(ECHO) ' LD $@'
|
||||||
$(SILENT)$(HOST_LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -o $@ $^
|
$(SILENT)$(HOST_LD) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS)
|
||||||
|
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
# Cleaning up the mess...
|
# Cleaning up the mess...
|
||||||
|
@ -4,21 +4,15 @@
|
|||||||
# What library to link
|
# What library to link
|
||||||
ldflags()
|
ldflags()
|
||||||
{
|
{
|
||||||
$cc -print-file-name=libncursesw.so | grep -q /
|
for ext in so a dylib ; do
|
||||||
if [ $? -eq 0 ]; then
|
for lib in ncursesw ncurses curses ; do
|
||||||
echo '-lncursesw'
|
$cc -print-file-name=lib${lib}.${ext} | grep -q /
|
||||||
exit
|
if [ $? -eq 0 ]; then
|
||||||
fi
|
echo "-l${lib}"
|
||||||
$cc -print-file-name=libncurses.so | grep -q /
|
exit
|
||||||
if [ $? -eq 0 ]; then
|
fi
|
||||||
echo '-lncurses'
|
done
|
||||||
exit
|
done
|
||||||
fi
|
|
||||||
$cc -print-file-name=libcurses.so | grep -q /
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo '-lcurses'
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,14 +36,18 @@ trap "rm -f $tmp" 0 1 2 3 15
|
|||||||
|
|
||||||
# Check if we can link to ncurses
|
# Check if we can link to ncurses
|
||||||
check() {
|
check() {
|
||||||
echo "main() {}" | $cc -xc - -o $tmp 2> /dev/null
|
$cc -xc - -o $tmp 2>/dev/null <<'EOF'
|
||||||
if [ $? -ne 0 ]; then
|
#include CURSES_LOC
|
||||||
echo " *** Unable to find the ncurses libraries." 1>&2
|
main() {}
|
||||||
echo " *** make menuconfig require the ncurses libraries" 1>&2
|
EOF
|
||||||
echo " *** " 1>&2
|
if [ $? != 0 ]; then
|
||||||
echo " *** Install ncurses (ncurses-devel) and try again" 1>&2
|
echo " *** Unable to find the ncurses libraries or the" 1>&2
|
||||||
echo " *** " 1>&2
|
echo " *** required header files." 1>&2
|
||||||
exit 1
|
echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2
|
||||||
|
echo " *** " 1>&2
|
||||||
|
echo " *** Install ncurses (ncurses-devel) and try again." 1>&2
|
||||||
|
echo " *** " 1>&2
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user