X-Git-Url: https://git.ti.com/gitweb?p=apps%2Fthermostat-demo.git;a=blobdiff_plain;f=Makefile.build;h=fb0eb6aec0f60c80c6ab38bbc2caea198d9cb395;hp=18892d4f6bcf9372c3330f9c03bd12b34e010428;hb=db7959b200e0ecbe59ff1c867251b1a8b17bd567;hpb=7bdb827182e9e9dabf067ccbccf8428144c95d83 diff --git a/Makefile.build b/Makefile.build index 18892d4..fb0eb6a 100644 --- a/Makefile.build +++ b/Makefile.build @@ -2,31 +2,37 @@ ENV_SETUP ?= ../../linux-devkit/environment-setup DESTDIR ?= -PLATFORM ?= MATRIX_APP_DIR ?= /usr/share/matrix-gui-2.0/apps/ -PLATFORM_DEFINE ?= "Platform_${PLATFORM}" -SOURCES = main.cpp ThermostatDemo.pro - -all: debug release +all: release +.PHONY: qmake qmake : ThermostatDemo.pro @. ${ENV_SETUP}; \ - qmake2 CONFIG+=debug_and_release QMAKE_CXXFLAGS_DEBUG+=-D${PLATFORM_DEFINE} QMAKE_CXXFLAGS_RELEASE+=-D${PLATFORM_DEFINE} ThermostatDemo.pro + qmake CONFIG+=release ThermostatDemo.pro + +qmake_debug : ThermostatDemo.pro + @. ${ENV_SETUP}; \ + qmake CONFIG+=debug ThermostatDemo.pro -debug : ${SOURCES} qmake +debug : qmake_debug @. ${ENV_SETUP}; \ - make -f Makefile debug + make -release : ${SOURCES} qmake +release : qmake @. ${ENV_SETUP}; \ - make -f Makefile release + make -clean : ${SOURCES} qmake +clean : qmake @. ${ENV_SETUP}; \ - make -f Makefile distclean + make distclean install_common: + @if [ ! -d $(DESTDIR) ] ; then \ + echo "The extracted target filesystem directory doesn't exist."; \ + echo "Please run setup.sh in the SDK's root directory and then try again."; \ + exit 1; \ + fi @install -d ${DESTDIR}/usr/bin @install -m 0755 ThermostatDemo ${DESTDIR}/usr/bin/ThermostatDemo @install -d ${DESTDIR}${MATRIX_APP_DIR}/qt_tstat