1##############################################################################
2#                                                                            #
3#                  FOX:  A Free C++ Class Library for X                      #
4#                                                                            #
5##############################################################################
6# Copyright (C) 2004 by Jeroen van der Zijp.   All Rights Reserved.          #
7##############################################################################
8# $Id: Makefile.bc,v 1.3 2005/02/04 04:33:19 fox Exp $                       #
9##############################################################################
10# This library is free software; you can redistribute it and/or              #
11# modify it under the terms of the GNU Library General Public                #
12# License as published by the Free Software Foundation; either               #
13# version 2 of the License, or (at your option) any later version.           #
14#                                                                            #
15# This library is distributed in the hope that it will be useful,            #
16# but WITHOUT ANY WARRANTY; without even the implied warranty of             #
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU          #
18# Library General Public License for more details.                           #
19#                                                                            #
20# You should have received a copy of the GNU Library General Public          #
21# License along with this library; if not, write to the Free                 #
22# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.         #
23##############################################################################
24
25# For use with Borland C++ Builder 3 or later
26CXX       = bcc32
27CXXFLAGS  = -5 -O2 -w-par -w-csu -w-aus
28RM        = del
29LIB	  = tlib
30TOPDIR    = ..
31DEFINES   = -DNDEBUG -DFOX_BIGENDIAN=0 -DWIN32 -D_WINDOWS
32LD        = bcc32
33LDFLAGS   = -laa
34GLLIBS    = opengl32.lib glu32.lib
35INCDIRS   = -I$(TOPDIR)\include
36FOXLIB    = $(TOPDIR)\src\FOX-1.4.lib
37CHARTLIB  = $(TOPDIR)\src\CHART-1.4.lib
38RESWRAP   = $(TOPDIR)\utils\reswrap.exe
39
40
41.SUFFIXES: .cpp .c
42
43PROGRAMS  = chart.exe
44
45SOURCES = \
46chart.cpp \
47FXChart.cpp \
48icons.cpp
49
50OBJECTS = $(SOURCES:.cpp=.obj)
51
52ICONS = \
53marble.bmp
54
55.cpp.obj:
56	$(CXX) -c $(INCDIRS) $(CXXFLAGS) $(DEFINES) $*.cpp
57
58
59all: $(CHARTLIB) $(PROGRAMS)
60
61
62chart.exe: $(OBJECTS) $(FOXLIB)
63	$(LD) $(LDFLAGS) $(OBJECTS) $(FOXLIB)
64
65
66chart.obj: icons.h icons.cpp
67
68
69icons.h: $(ICONS)
70	$(RESWRAP) -i -o icons.h $**
71
72
73icons.cpp: $(ICONS)
74	$(RESWRAP) -e -o icons.cpp $**
75
76
77clean:
78	$(RM) $(CHARTLIB)
79	$(RM) *.obj
80	$(RM) *.exe
81	$(RM) *.tds
82	$(RM) icons.cpp
83	$(RM) icons.h
84
85
86# Make the library
87$(CHARTLIB): $(OBJECTS) Makefile.bc.resp
88	touch $(CHARTLIB)
89	del $(CHARTLIB)
90	$(LIB) "$(CHARTLIB)" /P128 @Makefile.bc.resp
91