-rw-r--r-- | scripts/kconfig/Makefile | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 7553311..caad231 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -11,4 +11,24 @@ YFLAGS=-d -t -v ifndef HOSTQTDIR +ifeq ($(shell if [ -e /usr/share/qt ]; then echo foundit; fi),foundit) HOSTQTDIR=/usr/share/qt +else +ifeq ($(shell if [ -e /usr/lib/qt ]; then echo foundit; fi),foundit) +HOSTQTDIR=/usr/lib/qt +endif +endif +endif + +ifndef QTLIB +ifeq ($(shell if [ -e $(HOSTQTDIR)/lib/libqt.so ]; then echo foundit; fi),foundit) +QTLIB=-lqt +else +ifeq ($(shell if [ -e $(HOSTQTDIR)/lib/libqt-mt.so ]; then echo foundit; fi),foundit) +QTLIB=-lqt-mt +else +QTLIB=-lqt +$(warning Unable to locate libqt.so!) +endif endif +endif + MOC=$(wildcard $(HOSTQTDIR)/bin/moc) @@ -113,3 +133,3 @@ else qconf: $(qconf_OBJ) libkconfig.so - $(CXX) $(LXXFLAGS) $^ -lqt -o $@ + $(CXX) $(LXXFLAGS) $^ $(QTLIB) -o $@ endif |