1# requires nall/Makefile
2
3# exports the following symbols:
4# $(moc)   -- meta-object compiler
5# $(rcc)   -- resource compiler
6# $(qtinc) -- includes for compiling
7# $(qtlib) -- libraries for linking
8
9ifeq ($(moc),)
10moc := moc
11endif
12
13ifeq ($(rcc),)
14rcc := rcc
15endif
16
17ifeq ($(platform),x)
18  qtinc := `pkg-config --cflags QtCore QtGui`
19  qtlib := `pkg-config --libs QtCore QtGui`
20else ifeq ($(platform),osx)
21  qtinc := -I/Library/Frameworks/QtCore.framework/Versions/4/Headers
22  qtinc += -I/Library/Frameworks/QtGui.framework/Versions/4/Headers
23  qtinc += -I/Library/Frameworks/QtOpenGL.framework/Versions/4/Headers
24
25  qtlib := -L/Library/Frameworks
26  qtlib += -framework QtCore
27  qtlib += -framework QtGui
28  qtlib += -framework QtOpenGL
29  qtlib += -framework Carbon
30  qtlib += -framework Cocoa
31  qtlib += -framework OpenGL
32  qtlib += -framework AppKit
33  qtlib += -framework ApplicationServices
34else ifeq ($(platform),win)
35  ifeq ($(qtpath),)
36    # find Qt install directory from PATH environment variable
37    qtpath := $(foreach path,$(subst ;, ,$(PATH)),$(if $(wildcard $(path)/$(moc).exe),$(path)))
38    qtpath := $(strip $(qtpath))
39    qtpath := $(subst \,/,$(qtpath))
40    qtpath := $(patsubst %/bin,%,$(qtpath))
41  endif
42
43  qtinc := -I$(qtpath)/include
44  qtinc += -I$(qtpath)/include/QtCore
45  qtinc += -I$(qtpath)/include/QtGui
46
47  qtlib := -L$(qtpath)/lib
48  qtlib += -L$(qtpath)/plugins/imageformats
49
50  qtlib += -lmingw32 -lqtmain -lQtGui4 -lcomdlg32 -loleaut32 -limm32 -lwinmm
51  qtlib += -lwinspool -lmsimg32 -lQtCore4 -lole32 -ladvapi32 -lws2_32 -luuid -lgdi32
52
53  # optional image-file support:
54  # qtlib += -lqjpeg -lqmng
55endif
56