summaryrefslogtreecommitdiffstats
path: root/private/os2/client/thunk/thunkcom/makefile
blob: e4e7a2ea5a9f7a6df50b4766019260992fde538d (plain) (blame)
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
90
91
92
93
94
95
96
97
# Make file for thunk compiler for Win32
#
# 10.11.90  KevinR      brought over from OS/2 2.0
# 8 Sep 92  PatrickQ    Added support for PMNT

!IFDEF PMNT
CFLAGS= /c /Zi /AL /G2s /I..\include /DPMNT
!ELSE
CFLAGS= /c /Zi /AL /G2s /I..\include
!ENDIF
LFLAGS= /CO /NOD
CLIBS=  llibcep os2286


INCLUDES= thunk.h types.h symtab.h thunk.h error.h
OBJS = thunk.obj types.obj error.obj symtab.obj mtcpars.obj mtclex.obj \
       codegen.obj \
#cod3216.obj cod3216b.obj cod3216g.obj \
       combine.obj globals.obj cod1632.obj cod1632b.obj

.c.obj:
#        cl $(CFLAGS) /W3 $*.c
        cl $(CFLAGS) $*.c


!IFDEF PMNT
thunk: thunkpm.exe
!ELSE
thunk: thunk.exe
!ENDIF

all: thunk.exe sample16.obj sample32.obj


!IFDEF PMNT
thunkpm.exe: $(OBJS)
!ELSE
thunk.exe: $(OBJS)
!ENDIF
        link $(LFLAGS) $(OBJS),$@,,$(CLIBS),thunk.def;

hello.exe: hello.obj
        link $(LFLAGS) hello.obj,$@,,$(CLIBS),$*.def;
tmp.exe: tmp.obj
        link $(LFLAGS) tmp.obj,$@,,$(CLIBS),$*.def;
!IFDEF copyexe
        copy $@ ..\..\binp
!ENDIF

thunk.obj:    thunk.c thunk.h

error.obj:    error.c error.h thunk.h

types.obj:    types.c types.h error.h

symtab.obj:   symtab.c symtab.h types.h thunk.h

codegen.obj:  codegen.c codegen.h $(INCLUDES)

combine.obj:  combine.c  $(INCLUDES)

globals.obj:  globals.c  $(INCLUDES)

cod3216.obj:  cod3216.c  $(INCLUDES)

cod3216b.obj: cod3216b.c $(INCLUDES)

cod3216g.obj: cod3216g.c $(INCLUDES)

cod1632.obj:  cod1632.c  $(INCLUDES) codegen.h globals.h

cod1632b.obj: cod1632b.c $(INCLUDES) codegen.h globals.h cod1632b.h

mtcpars.obj:  mtcpars.c  $(INCLUDES)
        cl $(CFLAGS) /W2 $*.c

mtclex.obj:   mtclex.c mtcpars.c
        cl $(CFLAGS) $*.c

mtcpars.c:    mtcpars.y
        yaccp -h mtcpars.y

mtclex.c:     mtclex.l
        lex -t mtclex.l > mtclex.c

hello.obj:    hello.c

tmp.obj:    tmp.c

sample.asm: sample.thk
        thunk -y -NA THUNK32 -NC THUNK16 $*.thk

sample16.obj: sample.asm
        ml -W3 -c -Fl$*.lst -Fo$*.obj -DGEN16 sample.asm

sample32.obj: sample.asm
        ml -W3 -c -Fl$*.lst -Fo$*.obj -DGEN32 sample.asm