KDEINC=-I/usr/local/include
QTINC=-I/usr/X11R6/include/qt2
KDELIB=-L/usr/local/lib -lkdeui -lkdecore
QTLIB=-L/usr/X11R6/lib -lqt2
MOC=/usr/X11R6/bin/moc2

all: test

hellowindow: hellowindow.c
	g++ ${KDEINC} ${QTINC} -Wall -o hellowindow hellowindow.c ${KDELIB} \
	    ${QTLIB}

CFLAGS=-g -Wall ${KDEINC} ${QTINC}
LDFLAGS=${KDELIB} ${QTLIB}

main.o: main.cc test.h
test.moc: test.h
	${MOC} test.h -o test.moc
test.o: test.cc test.h test.moc
test: main.o test.o modulelist.o sysctllist.o
	g++ -o ${.TARGET} ${.ALLSRC} ${KDELIB} ${QTLIB}
modulelist.moc: modulelist.h
	${MOC} modulelist.h -o modulelist.moc
modulelist.o: modulelist.cc modulelist.moc
sysctllist.moc: sysctllist.h
	${MOC} sysctllist.h -o sysctllist.moc
sysctllist.o: sysctllist.cc sysctllist.moc

clean:
	rm -f test *.o test.moc *.core
