1##############################################################################
2#                                                                            #
3#                  FOX:  A Free C++ Class Library for X                      #
4#                                                                            #
5##############################################################################
6# Contributed by: Andre Fornacon <afo@zlug.org>                              #
7##############################################################################
8# $Id: Makefile.dmc,v 1.10 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# Digital Mars C++ Compiler 8.x or later
26CXX       = sc
27CXXFLAGS  = -mn -5 -a8
28RM        = del
29TOPDIR    = ..
30DEFINES   = -DNDEBUG -DFOX_BIGENDIAN=0 -DWIN32 -D_WINDOWS
31LD	  = sc
32LDFLAGS	  =
33LIBS	  = advapi32.lib+shell32.lib+gdi32.lib+wsock32.lib
34GLLIBS    = opengl32.lib glu32.lib
35INCDIRS   = -I$(TOPDIR)\include
36FOXLIB    = $(TOPDIR)\src\FOX-1.4.lib
37RESWRAP   = $(TOPDIR)\utils\reswrap.exe
38
39PROGRAMS  = calculator.exe
40
41OBJECTS   = Calculator.obj main.obj icons.obj HelpWindow.obj Preferences.obj help.obj
42
43ICONS = colors.gif information.gif bigcalc.gif constmem.bmp question.gif tinycalc.gif
44
45
46.cpp.obj:
47	$(CXX) -c $(INCDIRS) $(CXXFLAGS) $(DEFINES) $*.cpp
48
49all: $(PROGRAMS)
50
51
52calculator.exe: $(OBJECTS) $(FOXLIB)
53	$(LD) $(LDFLAGS) $(OBJECTS) $(FOXLIB) $(LIBS)
54
55calculator.obj: icons.cpp
56
57icons.h: $(ICONS)
58	$(RM) $@
59	$(RESWRAP) -i -oa $@ $(ICONS)
60
61icons.cpp: $(ICONS)
62	$(RM) $@
63	echo ^#include "icons.h" > $@
64	$(RESWRAP) -oa $@ $(ICONS)
65
66clean:
67	$(RM) *.obj *.exe *.tds *.map icons.cpp
68