##############################################################################
#									     #
#		   FOX:  A Free C++ Class Library for X 		     #
#									     #
##############################################################################
# Copyright (C) 1997,2002 by Jeroen van der Zijp.   All Rights Reserved      #
##############################################################################
# $Id: Makefile.bc,v 1.13 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 Borland C++ Builder 3 or later
CXX	  = bcc32
CXXFLAGS  = -5 -O2 -w-par -w-csu -w-aus
RM	  = del
TOPDIR	  = ..
DEFINES   = -DNDEBUG -DFOX_BIGENDIAN=0 -DWIN32 -D_WINDOWS
LD	  = bcc32
LDFLAGS   = -laa
GLLIBS	  = opengl32.lib glu32.lib
INCDIRS   = -I$(TOPDIR)\include
FOXLIB	  = $(TOPDIR)\src\FOX-1.6.lib
RESWRAP   = $(TOPDIR)\utils\reswrap.exe

PROGRAMS  = adie.exe

OBJECTS   = \
	adie.obj \
	Commands.obj  \
	HelpWindow.obj \
	TextWindow.obj \
	Preferences.obj \
	help.obj \
	Hilite.obj \
	icons.obj \
        parsesyntax.obj \
	main.obj

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

.cpp.obj:
	$(CXX) -c $(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.cpp: $(ICONS)
	$(RESWRAP) -e -o icons.cpp $**

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