jw-pkg/make/qt-rules.mk
Jan Lindemann 58ab619f0b make: Rename CFLAGS, CXXFLAGS and CPPFLAGS variables
Rename CFLAGS and friends to follow the conventions of the implicit rules
defined by GNU Make:

 - $(CPPFLAGS) is passed to both C++ and C compiler
 - $(CXXFLAGS) is passed to C++ compiler only
 - $(CFLAGS) is passed to C compiler only
 - C++ compiler is in $(CXX)

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-19 07:07:00 +00:00

27 lines
525 B
Makefile

ifeq ($(QT_MAJOR_VERSION),3)
moc_%.cpp: %.h
$(MOC) -o $@ $<
else
moc_%.cpp: %.h
$(MOC) $(filter -D% -I%,$(strip $(BUILD_CXXFLAGS) $(BUILD_CPPFLAGS))) -o $@ $<
moc_%.cpp: include/%.h
$(MOC) $(filter -D% -I%,$(strip $(BUILD_CXXFLAGS) $(BUILD_CPPFLAGS))) -o $@ $<
endif
rcc_%.cpp: %.qrc
$(RCC) -o $@ $<
ifeq ($(QT_MAJOR_VERSION),4)
ui_%.h: %.ui
else
%.h: %.ui
endif
$(UIC) $< -o $@
ifeq ($(QT_MAJOR_VERSION),4)
uic_%.cpp: ui_%.h
echo -e "#include \"$<\"\n" > $@
else
uic_%.cpp: %.h %.ui
$(UIC) $*.ui -i $< -o $@
endif