| 1 |
include ../config.mak |
| 2 |
QT=qt4 |
| 3 |
QTIM=$(QT)/plugins/inputmethods |
| 4 |
IMMODULES=$(libdir)/$(DEB_BUILD_MULTIARCH)/$(QTIM) |
| 5 |
|
| 6 |
INCS=-I../im-client -I/usr/include/X11 `pkg-config QtCore QtGui --cflags` |
| •7 |
CXXFLAGS+=$(OPTFLAGS) $(INCS) -Wall -D_REENTRANT -DUNIX=1 -fPIC -DQT4 -DQT_SHARED \ |
| 8 |
-DQT_IMMODULE -DPIC |
| 9 |
OBJS= moc_gcin-qt.o gcin-qt.o im-gcin-qt.o gcin-imcontext-qt.o |
| 10 |
.SUFFIXES: .c .cpp .a .so .E .h |
| •11 |
LDFLAGS+=-L../im-client -lgcin-im-client `pkg-config QtCore QtGui --libs` |
| 12 |
all: im-gcin.so |
| 13 |
|
| 14 |
.cpp.E: |
| 15 |
$(CXX) -E $(CFLAGS) $(INCS) $< > $@ |
| 16 |
|
| 17 |
moc_gcin-qt.cpp: gcin-qt.h |
| 18 |
$(QT4_MOC) $< -o moc_gcin-qt.cpp |
| 19 |
|
| 20 |
im-gcin.so: $(OBJS) |
| 21 |
export LD_RUN_PATH=$(gcinlibdir) ;\ |
| 22 |
$(CXX) $(gcc_ld_run_path) -fno-exceptions -shared -o $@ $(OBJS) $(LDFLAGS) |
| 23 |
rm -f core.* |
| 24 |
install: |
| 25 |
if [ $(prefix) = /usr/local ]; then \ |
| 26 |
install -d $(DESTDIR)/$(QT4_IM_DIR); \ |
| 27 |
install -m 755 im-gcin.so $(DESTDIR)/$(QT4_IM_DIR); \ |
| 28 |
else \ |
| 29 |
install -d $(IMMODULES); \ |
| 30 |
install -m 755 im-gcin.so $(IMMODULES); \ |
| 31 |
fi |
| 32 |
clean: |
| 33 |
rm -f $(OBJS) im-gcin.so *~ core.* *moc*.cpp *.E .depend |
| 34 |
|
| 35 |
.depend: |
| 36 |
$(CXX) $(CXXFLAGS) -MM *.cpp > $@ |
| 37 |
|
| 38 |
include .depend |