aboutsummaryrefslogtreecommitdiff
path: root/zinclib.d/makefile.vc
blob: 08e312e7b20f973693604f6ca7dd6e52c1187257 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89

TCLTK_FULL_VER = 8.4.9
TCLTK_LIB_VER = 84
TKZINC_MAJOR = 3
TKZINC_MINOR = 3
TKZINC_PATCHLVL = 0

CC		= cl
LD		= link
CP		= copy
RM		= del
#
# The SDK lib path should be available in the
# environment variable %LIB%
libpath32	= /LIBPATH:"$(LIB)"
#
# The SDK include path should be available in the
# environment variable %INCLUDE%
include32	= /I"$(INCLUDE)" /I"C:\Program Files\Microsoft Platform SDK for Windows XP SP2\include\GL"

#
# Default location for ActiveTcl
prefix = c:\Tcl
exec_prefix = $(prefix)

bindir = $(exec_prefix)\bin
libdir = $(exec_prefix)\lib
incdir = $(prefix)\include
mandir = $(prefix)\man\man3

rootdir = .
srcdir = $(rootdir)\src
testdir = $(rootdir)\test
tmpdir = $(rootdir)\tmp

INCLUDES    = /I"$(incdir)" /I$(srcdir) $(include32)

# Assume that WISH is already INSTALLED
TCLSH		= $(bindir)\tclsh$(TCLTK_LIB_VER)
WISH		= $(bindir)\wish$(TCLTK_LIB_VER)
WIN_LIBS	= user32.lib gdi32.lib ws2_32.lib
GL_LIBS		= glu32.lib opengl32.lib
TK_LIBS		= $(libdir)\tcl$(TCLTK_LIB_VER).lib \
		  $(libdir)\tk$(TCLTK_LIB_VER).lib \
      $(libdir)\Tkzinc$(TKZINC_MAJOR).$(TKZINC_MINOR).$(TKZINC_PATCHLVL)\Tkzinc$(TKZINC_MAJOR)$(TKZINC_MINOR)$(TKZINC_PATCHLVL).lib
LIBS = $(WIN_LIBS) $(GL_LIBS) $(TK_LIBS) $(tmpdir)/zinclib.lib

VERSION = \"$(TKZINC_MAJOR).$(TKZINC_MINOR).$(TKZINC_PATCHLVL)\"

CDEBUG = /Z7 -Od
CFLAGS = /c /W3 /nologo /YX $(CDEBUG)
CPPFLAGS = /Fp$(tmpdir)\ $(INCLUDES) /DBUILD_zinclib

LFLAGS	= /nologo /machine:IX86 $(libpath32) /FORCE:MULTIPLE /NODEFAULTLIB:uuid.lib /NODEFAULTLIB:OLDNAMES.lib

OBJS = $(tmpdir)\ZincObjects.obj $(tmpdir)\ZincPath.obj $(tmpdir)\Zinc.obj

$(tmpdir)\zinclib.lib: $(tmpdir) $(OBJS)
  lib /OUT:$@ $(OBJS)

$(tmpdir):
  mkdir $(tmpdir)

{$(srcdir)}.cpp{$(tmpdir)}.obj:
	$(CC) $(CPPFLAGS) $(CFLAGS) -Fo$(tmpdir)\ $<

demos: $(testdir)/items.exe $(testdir)/widget.exe $(testdir)/test.exe $(testdir)/itemconf.exe

$(testdir)/items.exe: $(tmpdir)/items.obj $(tmpdir)\zinclib.lib
	$(LD) $(LFLAGS) $(LIBS) /OUT:$@ $**

$(testdir)/widget.exe: $(tmpdir)/widget.obj $(tmpdir)\zinclib.lib
	$(LD) $(LFLAGS) $(LIBS) /OUT:$@ $**

$(testdir)/test.exe: $(tmpdir)/test.obj $(tmpdir)\zinclib.lib
	$(LD) $(LFLAGS) $(LIBS) /OUT:$@ $**

$(testdir)/itemconf.exe: $(tmpdir)/itemconf.obj $(tmpdir)\zinclib.lib
	$(LD) $(LFLAGS) $(LIBS) /OUT:$@ $**


{$(testdir)}.cpp{$(tmpdir)}.obj:
	$(CC) $(CPPFLAGS) $(CFLAGS) -Fo$(tmpdir)\ $<

mostlyclean:
	$(RM) *.bak *~ $(tmpdir)\*.obj
clean:
	$(RM) $(tmpdir)\*.obj $(tmpdir)\*.dll $(tmpdir)\*.lib $(tmpdir)\*.exp $(tmpdir)\*.pch