blob: 3871222e2c7739055a2c15287847be3e0193b5f4 (
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
|
SRCDIR =.
!ifdef DEBUG
OUTDIR =Debug
CFLAGS =-Od -Zi -GZ -MDd -D_DEBUG
LDFLAGS=-debug:full -debugtype:cv
!else
OUTDIR =Release
CFLAGS =-O2 -Op -Gs -MD -DNDEBUG
LDFLAGS=-release -opt:ref -opt:icf,3
!endif
TMPDIR =$(OUTDIR)\Objects
OBJS = \
$(TMPDIR)\jim.obj
CC =cl -nologo
LD =link -nologo
CFLAGS =$(CFLAGS) -W3 -GX -Fd$(TARGET:.dll=.pdb) -YX -Fp$(TMPDIR)^\
INC =-I../metakit/include -I/opt/include
DEFS =-DWIN32
LIBS =
all: jim jim-win32
jim: setup $(OUTDIR)\jim.exe
jim-win32: setup $(OUTDIR)\jim-win32.dll
$(OUTDIR)\jim.exe: $(OBJS)
$(LD) $(LDFLAGS) -out:$@ $** $(LIBS)
$(OUTDIR)\jim-win32.dll: $(TMPDIR)\jim-win32.obj
$(LD) $(LDFLAGS) -dll -out:$@ $** $(LIBS)
#-------------------------------------------------------------------------
setup:
@if not exist $(OUTDIR) mkdir $(OUTDIR)
@if not exist $(TMPDIR) mkdir $(TMPDIR)
test: jim
$(OUTDIR)\jim.exe test.tcl
clean:
@if exist $(TMPDIR) rmdir /q /s $(TMPDIR) >NUL
realclean: clean
@if exist $(OUTDIR) rmdir /q /s $(OUTDIR) >NUL
#-------------------------------------------------------------------------
.SUFFIXES:.c .cpp
{$(SRCDIR)}.c{$(TMPDIR)}.obj::
$(CC) $(CFLAGS) $(DEFS) $(INC) -Fa$(TMPDIR)^\ -Fo$(TMPDIR)^\ -c @<<
$<
<<
{$(SRCDIR)}.cpp{$(TMPDIR)}.obj::
$(CC) $(CFLAGS) $(DEFS) $(INC) -Fo$(TMPDIR)^\ -c @<<
$<
<<
#-------------------------------------------------------------------------
|