mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-24 22:50:39 +01:00
make: Support QT applications
Need to have USE_PROJECT_LIB = true if a project lib is required
This commit is contained in:
parent
52a009fd80
commit
76be1a319f
2 changed files with 35 additions and 6 deletions
|
|
@ -33,6 +33,8 @@ GCC_REV = $(shell gcc -v 2>&1 | grep version | awk '{ split($$3,a,"."); pri
|
|||
# TOPDIR := $(MODDIR)
|
||||
#endif
|
||||
|
||||
CPP = g++
|
||||
|
||||
#LIBNAME = $(PROJECT)
|
||||
CFILES = $(wildcard *.c)
|
||||
CPPFILES = $(wildcard *.cc *.cpp)
|
||||
|
|
@ -91,13 +93,33 @@ LDFFTW = -lrfftw -lfftw -lm
|
|||
|
||||
INSTALLED_SHOBJS = $(addprefix $(PREFIX)/lib/,$(SHOBJS))
|
||||
|
||||
ifeq ($(GCC_MAJOR),2)
|
||||
LPPFLAGS = -lg++ -lstdc++
|
||||
else
|
||||
LPPFLAGS = -lstdc++ -L/usr/local/lib
|
||||
ifeq ($(USE_QT),true)
|
||||
USE_X = true
|
||||
|
||||
MOC = /usr/lib/qt2/bin/moc
|
||||
UIC = /usr/lib/qt2/bin/uic
|
||||
|
||||
MOC_CPP = $(patsubst %.h,moc_%.cpp,$(MOC_HEADER))
|
||||
OBJ += $(patsubst %.cpp,%.o,$(MOC_CPP))
|
||||
LPPFLAGS += -L/usr/lib/qt2/lib -lqt
|
||||
INCLUDE += -I/usr/lib/qt2/include
|
||||
endif
|
||||
|
||||
LDFLAGS = -L$(LIBDIR) -l$(LIBNAME) $(LOCAL_LDFLAGS) $(PROJECT_LDFLAGS) $(LPPFLAGS)
|
||||
ifeq ($(USE_X),true)
|
||||
LDFLAGS += -L/usr/X11/lib -lXext -lX11
|
||||
endif
|
||||
|
||||
ifeq ($(GCC_MAJOR),2)
|
||||
LPPFLAGS += -lg++ -lstdc++
|
||||
else
|
||||
LPPFLAGS += -lstdc++ -L/usr/local/lib
|
||||
endif
|
||||
|
||||
ifeq ($(USE_PROJECT_LIB),true)
|
||||
PROJECTLIB_LDFLAGS = -L$(LIBDIR) -l$(LIBNAME)
|
||||
endif
|
||||
|
||||
LDFLAGS = $(USE_PROJECT_LIB) $(LOCAL_LDFLAGS) $(PROJECT_LDFLAGS) $(LPPFLAGS)
|
||||
LDREST = $(LDAUDIO) $(LDFFTW) -ldl
|
||||
CC = $(YAMD)gcc
|
||||
CPP = $(YAMD)g++
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue