##############################################################################
#									     #
#		   FOX:  A Free C++ Class Library for X 		     #
#									     #
##############################################################################
# Copyright (C) 1997,2005 by Jeroen van der Zijp.   All Rights Reserved      #
##############################################################################
# $Id: Makefile.wc,v 1.9 2005/09/22 11:14:47 fox Exp $		             #
##############################################################################
# This library is free software; you can redistribute it and/or 	     #
# modify it under the terms of the GNU Library General Public		     #
# License as published by the Free Software Foundation; either		     #
# version 2 of the License, or (at your option) any later version.	     #
#									     #
# This library 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	     #
# Library General Public License for more details.			     #
#									     #
# You should have received a copy of the GNU Library General Public	     #
# License along with this library; if not, write to the Free		     #
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.	     #
##############################################################################

# For use with OpenWatcom C++ v1.0 or later
CXX	  = wpp386
CXXFLAGS  = /w3 /e1 /zq /5r /ei /xs /xr /fp5 /otexan /zp=4
RM	  = del
TOPDIR	  = ..
DEFINES   = -DNDEBUG -DFOX_BIGENDIAN=0 -DWIN32 -D_WINDOWS
LD	  = wcl386
LDFLAGS   = -l=nt_win
GLLIBS	  = opengl32.lib glu32.lib
INCDIRS   = -I$(TOPDIR)\include
FOXLIB	  = $(TOPDIR)\src\FOX-1.6.lib $(%WATCOM)\lib386\nt\comctl32.lib $(%WATCOM)\lib386\nt\wsock32.lib
RESWRAP   = $(TOPDIR)\utils\reswrap.exe

PROGRAMS  = adie.exe

OBJECTS  =
OBJECTS += adie.obj
OBJECTS += Commands.obj
OBJECTS += HelpWindow.obj
OBJECTS += TextWindow.obj
OBJECTS += Preferences.obj
OBJECTS += ParseSyntax.obj
OBJECTS += help.obj
OBJECTS += Hilite.obj
OBJECTS += icons.obj
OBJECTS += main.obj

ICONS  =
ICONS +=   adie_gif.gif
ICONS +=   big_gif.gif
ICONS +=   bookdel_gif.gif
ICONS +=   booknext_gif.gif
ICONS +=   bookprev_gif.gif
ICONS +=   bookset_gif.gif
ICONS +=   close_gif.gif
ICONS +=   colors_gif.gif
ICONS +=   copy_gif.gif
ICONS +=   cut_gif.gif
ICONS +=   delete_gif.gif
ICONS +=   delimit_gif.gif
ICONS +=   fonts_gif.gif
ICONS +=   help_gif.gif
ICONS +=   indent_gif.gif
ICONS +=   info_gif.gif
ICONS +=   lang_gif.gif
ICONS +=   new_gif.gif
ICONS +=   open_gif.gif
ICONS +=   palette_gif.gif
ICONS +=   paste_gif.gif
ICONS +=   pattern_gif.gif
ICONS +=   print_gif.gif
ICONS +=   quit_gif.gif
ICONS +=   redo_gif.gif
ICONS +=   reload_gif.gif
ICONS +=   saveall_gif.gif
ICONS +=   saveas_gif.gif
ICONS +=   save_gif.gif
ICONS +=   search_gif.gif
ICONS +=   searchnext_gif.gif
ICONS +=   searchprev_gif.gif
ICONS +=   shiftleft_gif.gif
ICONS +=   shiftright_gif.gif
ICONS +=   small_gif.gif
ICONS +=   styles_gif.gif
ICONS +=   syntax_gif.gif
ICONS +=   undo_gif.gif

.cpp.obj: .AUTODEPEND
	$(CXX) $(INCDIRS) $(CXXFLAGS) $(DEFINES) $*.cpp

all: $(PROGRAMS)


adie.exe: $(OBJECTS) $(FOXLIB)
	$(LD) $(LDFLAGS) $(OBJECTS) $(FOXLIB)

adie.obj: icons.h icons.cpp

icons.h: $(ICONS)
	$(RESWRAP) -i -o icons.h $(ICONS)

icons.cpp: $(ICONS)
	$(RESWRAP) -e -o icons.cpp $(ICONS)

clean: .SYMBOLIC
	$(RM) *.obj
	$(RM) *.exe
	$(RM) *.err
	$(RM) icons.cpp
	$(RM) icons.h
