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.16 2006/03/10 04:31:45 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	  = dmc
27CXXFLAGS  = -mn -5 -a8 -Ae -Ar
28RM        = del
29TOPDIR    = ..
30DEFINES   = -DFOX_BIGENDIAN=0 -DNDEBUG -D_WINDOWS -DWIN32 -DHAVE_VSSCANF -DHAVE_OPENGL #-DHAVE_PNG_H -DHAVE_JPEG_H -DHAVE_ZLIB_H -DHAVE_TIFF_H -DHAVE_BZ2LIB_H -DXMD_H
31LD	  = link
32LDFLAGS	  = /NOI /DELEXECUTABLE /PACKFUNCTIONS /EXETYPE:NT /SU:WINDOWS
33LIBS	  = gc.lib+snn.lib+kernel32.lib+user32.lib+comctl32.lib+comdlg32.lib+advapi32.lib+shell32.lib+gdi32.lib+wsock32.lib+winspool.lib
34GLLIBS    = opengl32.lib+glu32.lib
35INCDIRS   = -I$(TOPDIR)\include
36FOXLIB    = $(TOPDIR)\src\FOX-1.6.lib
37
38PROGRAMS  = \
39	ControlPanel.exe \
40	rex.exe \
41	minheritance.exe \
42	expression.exe \
43	memmap.exe \
44	mditest.exe \
45	table.exe \
46	groupbox.exe \
47	foursplit.exe \
48	datatarget.exe \
49	scribble.exe \
50	splitter.exe \
51	shutter.exe \
52	image.exe \
53	header.exe \
54	hello.exe \
55	hello2.exe \
56	switcher.exe \
57	iconlist.exe \
58	tabbook.exe \
59	dialog.exe \
60	dirlist.exe \
61	button.exe \
62	dctest.exe \
63	wizard.exe \
64	imageviewer.exe
65
66# on the following 2 programs compilation abort in the windows header files
67#	glviewer.exe \
68#	gltest.exe \
69#
70
71.cpp.obj:
72	$(CXX) -c $(INCDIRS) $(CXXFLAGS) $(DEFINES) $*.cpp
73
74all: $(PROGRAMS)
75
76ControlPanel.exe: $(FOXLIB) ControlPanel.obj
77	$(LD) $(LDFLAGS) ControlPanel.obj,,,$(FOXLIB) $(LIBS)
78
79rex.exe: $(FOXLIB) rex.obj
80	$(LD) $(LDFLAGS) rex.obj,,,$(FOXLIB) $(LIBS)
81
82minheritance.exe: $(FOXLIB) minheritance.obj
83	$(LD) $(LDFLAGS) minheritance.obj,,,$(FOXLIB) $(LIBS)
84
85expression.exe: $(FOXLIB) expression.obj
86	$(LD) $(LDFLAGS) expression.obj,,,$(FOXLIB) $(LIBS)
87
88memmap.exe: $(FOXLIB) memmap.obj
89	$(LD) $(LDFLAGS) memmap.obj,,,$(FOXLIB) $(LIBS)
90
91wizard.exe: $(FOXLIB) wizard.obj
92	$(LD) $(LDFLAGS) wizard.obj,,,$(FOXLIB) $(LIBS)
93
94foursplit.exe: $(FOXLIB) foursplit.obj
95	$(LD) $(LDFLAGS) foursplit.obj,,,$(FOXLIB) $(LIBS)
96
97tabbook.exe: $(FOXLIB) tabbook.obj
98	$(LD) $(LDFLAGS) tabbook.obj,,,$(FOXLIB) $(LIBS)
99
100table.exe: $(FOXLIB) table.obj
101	$(LD) $(LDFLAGS) table.obj,,,$(FOXLIB) $(LIBS)
102
103switcher.exe: $(FOXLIB) switcher.obj
104	$(LD) $(LDFLAGS) switcher.obj,,,$(FOXLIB) $(LIBS)
105
106button.exe: $(FOXLIB) button.obj
107	$(LD) $(LDFLAGS) button.obj,,,$(FOXLIB) $(LIBS)
108
109mditest.exe: $(FOXLIB) mditest.obj
110	$(LD) $(LDFLAGS) mditest.obj,,,$(FOXLIB) $(LIBS)
111
112datatarget.exe: $(FOXLIB) datatarget.obj
113	$(LD) $(LDFLAGS) datatarget.obj,,,$(FOXLIB) $(LIBS)
114
115imageviewer.exe: $(FOXLIB) imageviewer.obj
116	$(LD) $(LDFLAGS) imageviewer.obj,,,$(FOXLIB) $(LIBS) #libpng.lib zlib.lib libjpeg.lib libtiff.lib
117
118hello.exe: $(FOXLIB) hello.obj
119	$(LD) $(LDFLAGS) hello.obj,,,$(FOXLIB) $(LIBS)
120
121hello2.exe: $(FOXLIB) hello2.obj
122	$(LD) $(LDFLAGS) hello2.obj,,,$(FOXLIB) $(LIBS)
123
124dirlist.exe: $(FOXLIB) dirlist.obj
125	$(LD) $(LDFLAGS) dirlist.obj,,,$(FOXLIB) $(LIBS)
126
127groupbox.exe: $(FOXLIB) groupbox.obj
128	$(LD) $(LDFLAGS) groupbox.obj,,,$(FOXLIB) $(LIBS)
129
130scribble.exe: $(FOXLIB) scribble.obj
131	$(LD) $(LDFLAGS) scribble.obj,,,$(FOXLIB) $(LIBS)
132
133splitter.exe: $(FOXLIB) splitter.obj
134	$(LD) $(LDFLAGS) splitter.obj,,,$(FOXLIB) $(LIBS)
135
136iconlist.exe: $(FOXLIB) iconlist.obj
137	$(LD) $(LDFLAGS) iconlist.obj,,,$(FOXLIB) $(LIBS)
138
139header.exe: $(FOXLIB) header.obj
140	$(LD) $(LDFLAGS) header.obj,,,$(FOXLIB) $(LIBS)
141
142shutter.exe: $(FOXLIB) shutter.obj
143	$(LD) $(LDFLAGS) shutter.obj,,,$(FOXLIB) $(LIBS)
144
145image.exe: $(FOXLIB) image.obj
146	$(LD) $(LDFLAGS) image.obj,,,$(FOXLIB) $(LIBS)
147
148gltest.exe: $(FOXLIB) gltest.obj
149	$(LD) $(LDFLAGS) gltest.obj,,,$(FOXLIB) $(GLLIBS) $(LIBS)
150
151glviewer.exe: $(FOXLIB) glviewer.obj
152	$(LD) $(LDFLAGS) glviewer.obj,,,$(FOXLIB) $(GLLIBS) $(LIBS)
153
154dialog.exe: $(FOXLIB) dialog.obj
155	$(LD) $(LDFLAGS) dialog.obj,,,$(FOXLIB) $(LIBS)
156
157dctest.exe: $(FOXLIB) dctest.obj
158	$(LD) $(LDFLAGS) dctest.obj,,,$(FOXLIB) $(LIBS)
159
160clean:
161	del *.obj
162	del *.exe
163	del *.tds
164