Because a KDE object is being used in this program, it is necessary to include the KDE library that holds the object. There are some specialized KDE libraries, but the main two libraries are libkdecore and libkdeui.
INCL= -I$(QTDIR)/include -I$(KDEDIR)/include/kde
CFLAGS= -O2 -fno-strength-reduce
LFLAGS= -L$(QTDIR)/lib -L$(KDEDIR)/lib -L/usr/X11R6/lib
LIBS= -lkdecore -lkdeui -lqt-mt -lX11 -lXext -ldl
CC=g++
hellokde: hellokde.o
$(CC) $(LFLAGS) -o hellokde hellokde.o $(LIBS)
hellokde.o: hellokde.cpp
clean:
rm -f hellokde
rm -f hellokde.o
.SUFFIXES: .cpp
.cpp.o:
$(CC) -c $(CFLAGS) $(INCL) -o $@ $<