# FREEdraft main makefile

# Copyright (C) 1997  Cliff Johnson                                       #
#                                                                         #
# This program is free software; you can redistribute it and/or           #
# modify it under the terms of the GNU  General Public                    #
# License as published by the Free Software Foundation; either            #
# version 2 of the License, or (at your option) any later version.        #
#                                                                         #
# This software is distributed in the hope that it will be useful,        #
# but WITHOUT ANY WARRANTY; without even the implied warranty of          #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       #
# General Public License for more details.                                #
#                                                                         #
# You should have received a copy of the GNU General Public License       #
# along with this software (see COPYING.LIB); if not, write to the        #
# Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #


.SUFFIXES : . .cpp 

include Makefile.in

OBJECTS = \
$(VIEWPORT)/vdglcanvas.o \
$(VIEWPORT)/vdcmdwin.o \
$(VIEWPORT)/vdapp.o \
$(VIEWPORT)/typemaskbehavior.o \
$(VIEWPORT)/pointstack.o \
$(VIEWPORT)/modifierbehavior.o \
$(VIEWPORT)/functionmapbehavior.o \
$(VIEWPORT)/canvasglstate.o \
$(DRAWABLES)/drawablepoint.o \
$(DRAWABLES)/drawableline.o \
$(DRAWABLES)/drawablecircle.o \
$(DRAWABLES)/drawablesegment.o \
$(DRAWABLES)/drawablearc.o \
$(DRAWABLES)/tabledrawables.o \
$(DRAWABLES)/drawableexception.o \
$(DRAWABLES)/drawableentity.o \
$(DATAENGINE)/entitybank.o \
$(DATAENGINE)/engineutility.o \
$(DATAENGINE)/bankexception.o \
$(DATAENGINE)/handle.o \
$(DATAENGINE)/namehandler.o \
$(CORE)/selectstack.o \
$(CORE)/selection.o \
$(CORE)/attributes.o \
$(CORE)/coreexception.o \
$(CORE)/canvasregister.o \
$(CORE)/registeredentity.o \
$(CORE)/selectionfilter.o \
$(CORE)/group.o \
$(COMMAND)/menuhandler.o \
$(COMMAND)/comexception.o \
$(COMMAND)/colordialog.o \
$(COMMAND)/linestyledialog.o \
$(COMMAND)/inputstring.o \
$(COMMAND)/GEOMMENU/geommenuhandler.o \
$(COMMAND)/NOMENU/nomenuhandler.o \
$(COMMAND)/GEOMMENU/geommenuarcdialog.o \
$(COMMAND)/SAVERECALLMENU/saverecallmenuhandler.o \
$(COMMAND)/MEASUREMENTMENU/measurementmenuhandler.o 

LIBDIRS = -L/usr/X11R6/lib -L/home/cliff/local/lib
LIBS    = -lV -lVgl -lXaw3d -lXmu -lXt -lXext -lX11 -lGL -lGLw -lGLU -lm

all : objects cadlib2d
	$(CXX) $(CFLAGS) $(OBJECTS) $(LIBDIRS) $(LIBS) -L$(CADLIB2D) -lCad2D -o FREEdraft

objects :
	cd $(COMMAND) ; $(MAKE)
	cd $(CORE) ; $(MAKE)
	cd $(DATAENGINE) ; $(MAKE)
	cd $(DRAWABLES) ; $(MAKE)
	cd $(VIEWPORT) ; $(MAKE)

cadlib2d :
	cd $(CADLIB2D) ; $(MAKE)
clean :
	rm -f FREEdraft core 
	cd $(COMMAND) ; $(MAKE) clean
	cd $(CORE) ; $(MAKE) clean
	cd $(DATAENGINE) ; $(MAKE) clean
	cd $(DRAWABLES) ; $(MAKE) clean
	cd $(CADLIB2D) ; $(MAKE) clean
	cd $(VIEWPORT) ; $(MAKE) clean

vimclean : clean
	rm -f *~  
	cd $(COMMAND) ; $(MAKE) vimclean
	cd $(CORE) ; $(MAKE) vimclean
	cd $(DATAENGINE) ; $(MAKE) vimclean
	cd $(DRAWABLES) ; $(MAKE) vimclean
	cd $(CADLIB2D) ; $(MAKE) vimclean
	cd $(VIEWPORT) ; $(MAKE) vimclean

	
