LJ Archive

Listing 4. Makefile

QINC = -I/usr/lib/qt/include
KINC = -I/opt/kde/include
INCS = $(QINC) $(KINC)
LIBPATHS = -L/usr/X11R6/lib -L/opt/kde/lib
QLIB = -lqt
KLIB = -lkdecore -lkdeui -lkfm
XLIB = -lX11 -lXext
LIBS = $(LIBPATHS) $(KLIB) $(QLIB) $(XLIB)
CC = c++ -DSTDC_HEADERS -DHAVE_UNISTD_H $(LIBS)
CCo = c++ -c -DSTDC_HEADERS -DHAVE_UNISTD_H $(INCS)
khello : main.o khellotw.o
   $(CC) -o khello main.o khellotw.o
main.o : main.cpp khellotw.h
   $(CCo) main.cpp
khellotw.o : khellotw.cpp khellotw.moc
   $(CCo) khellotw.cpp
%.moc: %.h
   moc $< -o $@
clean:
   rm *.o *.moc
LJ Archive