File indexing completed on 2024-11-17 05:08:36
0001 #!/bin/sh 0002 # Copyright (C) 2007, mueller@kde.org. Released under GPL v2+. 0003 0004 /bin/true: 2> /dev/null 0005 echo -n "Using KDE : "; type -p kde4-config || { echo "kde4-config must be in path!"; exit 1; } 0006 echo -n "Using Qt : "; type -p qmake || { echo "qmake must be in path!"; exit 2; } 0007 exec make -f $0 check "$@" 0008 0009 QTINCDIR=$(shell qmake -query QT_INSTALL_HEADERS) 0010 QTINCS=$(patsubst %, -I$(QTINCDIR)/%, QtCore QtGui Qt) 0011 KDEINCDIR=$(shell kde4-config --prefix)/include 0012 0013 CXXFLAGS=-I$(KDEINCDIR) -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_KEYWORDS -I$(QTINCDIR) 0014 CXX=g++ 0015 0016 HEADERS=$(subst $(KDEINCDIR)/,,$(shell find $(KDEINCDIR) -type f -name '*.h')) 0017 SOURCES=$(patsubst %.h, %.cpp, $(HEADERS)) 0018 OBJECTS=$(patsubst %.cpp, %.o, $(SOURCES)) 0019 VPATH=$(KDEINCDIR) 0020 0021 .PHONY: check $(HEADERS) 0022 0023 %.o : %.cpp 0024 $(CXX) -Werror -Wno-long-long -pedantic $(CXXFLAGS) -c $(subst /,_, $<) -o $(subst /,_, $@) 0025 0026 %.cpp : %.h 0027 echo "#include <$<>" > $(subst /,_, $@) 0028 0029 check: $(OBJECTS) 0030 @rm -f $(patsubst /,_, $(SOURCES)) 0031 @rm -f $(patsubst /,_, $(OBJECTS))