Line | |
---|
1 | #!/usr/bin/make
|
---|
2 |
|
---|
3 | ifneq ($(windir),)
|
---|
4 | MINGWPATH = C:\\PROGRA~1\\mingw\\bin\\
|
---|
5 | QTPATH = C:\\PROGRA~1\\qt\\
|
---|
6 |
|
---|
7 | CPP = ${MINGWPATH}c++.exe
|
---|
8 | MOC = ${QTPATH}bin\\moc.exe
|
---|
9 | RM = del
|
---|
10 | CFLAGS = -W -O2 -I${QTPATH}include
|
---|
11 | LDFLAGS = -L${QTPATH}lib
|
---|
12 | LDLIBS = -lQtCore4 -lQtWebKit4 -lQtGui4 -lQtNetwork4
|
---|
13 | else
|
---|
14 | MOC = moc
|
---|
15 | #MOC = /usr/share/qt4/bin/moc
|
---|
16 | CPP = gcc
|
---|
17 |
|
---|
18 | PACKAGES = QtCore QtGui QtWebKit QtNetwork
|
---|
19 | CFLAGS = -W -O2 `pkg-config --cflags ${PACKAGES}`
|
---|
20 | LDFLAGS = `pkg-config --libs-only-L ${PACKAGES}`
|
---|
21 | LDLIBS = `pkg-config --libs-only-l ${PACKAGES}`
|
---|
22 | endif
|
---|
23 |
|
---|
24 | webkit-image: webkit-image.cpp webkit-image.h
|
---|
25 | $(CPP) -o $@ $(CFLAGS) $(LDFLAGS) webkit-image.cpp $(LDLIBS)
|
---|
26 |
|
---|
27 | webkit-image.h: webkit-image.cpp
|
---|
28 | $(MOC) webkit-image.cpp >$@
|
---|
29 |
|
---|
30 | clean:
|
---|
31 | ${RM} *.o webkit-image webkit-image.h
|
---|
Note:
See
TracBrowser
for help on using the repository browser.