mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-29 00:02:48 +01:00
defs.mk, exe.mk, rules.mk: Add support for QT ui generation from .ui files
This commit is contained in:
parent
edab2f1762
commit
a4079714c3
3 changed files with 31 additions and 4 deletions
15
make/defs.mk
15
make/defs.mk
|
|
@ -41,6 +41,7 @@ MKFILES = $(wildcard *.mk)
|
|||
|
||||
CFILES = $(wildcard *.c)
|
||||
CPPFILES = $(wildcard *.cc *.cpp)
|
||||
UIFILES = $(wildcard *.ui)
|
||||
CALLSRC = $(CFILES) $(CPPFILES)
|
||||
OBJ = $(patsubst %.cpp,%.o,$(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(CALLSRC))))
|
||||
SHOBJS = $(patsubst %.cpp,lib%.so,$(patsubst %.cc,lib%.so,$(patsubst %.c,lib%.so,$(CALLSRC))))
|
||||
|
|
@ -160,8 +161,18 @@ LD_LIB_PATH += $(QT_PREFIX)/lib
|
|||
MOC = $(QT_PREFIX)/bin/moc
|
||||
UIC = $(QT_PREFIX)/bin/uic
|
||||
|
||||
MOC_CPP = $(patsubst %.h,moc_%.cpp,$(MOC_HEADER))
|
||||
OBJ += $(patsubst %.cpp,%.o,$(MOC_CPP))
|
||||
ifneq ($(wildcard *.h),)
|
||||
MOC_H_HC = $(shell grep Q_OBJECT $(wildcard *.h) | cut -d: -f1 | sort -u)
|
||||
endif
|
||||
MOC_H_UI = $(patsubst %.ui,%.h,$(UIFILES))
|
||||
MOC_H = $(sort $(MOC_H_HC) $(MOC_H_UI))
|
||||
MOC_CPP = $(patsubst %.h,moc_%.cpp, $(MOC_H))
|
||||
UIC_H = $(patsubst %.ui,%.h, $(UIFILES))
|
||||
UIC_CPP = $(patsubst %.ui,uic_%.cpp, $(UIFILES))
|
||||
|
||||
OBJ += $(patsubst %.cpp,%.o,$(MOC_CPP))
|
||||
OBJ += $(patsubst %.cpp,%.o,$(UIC_CPP))
|
||||
|
||||
ifdef REENTRANT
|
||||
LPPFLAGS += -L$(QT_PREFIX)/lib -lqt-mt
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue