## This code example is from the following source:
##
## Book Title:  Programming with Objects, A Comparative Presentation
##              of Object-Oriented Programming with C++ and Java
##
## Book Author:   Avinash Kak
##
## Chapter:     Chapter 17  OO For Graphical User Interfaces, A Tour Of Three Toolkits
##
## Section:     Section 17.17  Windows with Menus in Qt
##


CC=g++

#the following is for static and dynamic linking
LDLIBS=-L$(QTDIR)/lib -lqt

#the following is for compiling
CFLAGS=-g -I$(QTDIR)/include 

WindowWithMenu: moc_WindowWithMenu.o WindowWithMenu.o \
                main_WindowWithMenu.o Makefile_WindowWithMenu
	$(CC) $(LDLIBS)  -o WindowWithMenu moc_WindowWithMenu.o \
                WindowWithMenu.o main_WindowWithMenu.o

moc_WindowWithMenu.cc: WindowWithMenu.h
	moc -o moc_WindowWithMenu.cc WindowWithMenu.h

moc_WindowWithMenu.o: moc_WindowWithMenu.cc
	$(CC) -c $(CFLAGS) -O2 moc_WindowWithMenu.cc

WindowWithMenu.o: WindowWithMenu.cc
	$(CC) -c $(CFLAGS) -O2 WindowWithMenu.cc

main_WindowWithMenu.o: main_WindowWithMenu.cc
	$(CC) -c $(CFLAGS) -O2 main_WindowWithMenu.cc

clean:
	rm -f WindowWithMenu
	rm -f moc*.*
	rm -f *.o
