-
Notifications
You must be signed in to change notification settings - Fork 23
/
TCC.mak
44 lines (31 loc) · 720 Bytes
/
TCC.mak
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
# This makefile (NMake) creates the JWasm Win32 binary with TCC.
name = jwasm
!ifndef TCCDIR
TCCDIR = \tcc
!endif
!ifndef DEBUG
DEBUG=0
!endif
!if $(DEBUG)
OUTD=TCCD
!else
OUTD=TCCR
!endif
!include gccmod.inc
inc_dirs = -Isrc\H -I"$(TCCDIR)\include"
!if $(DEBUG)
extra_c_flags = -g -DDEBUG_OUT
!else
extra_c_flags = -DNDEBUG
!endif
CC=@$(TCCDIR)\tcc.exe -c $(inc_dirs) -D__NT__ $(extra_c_flags)
{src}.c{$(OUTD)}.o:
@$(CC) -o$*.o $<
ALL: $(OUTD) $(OUTD)\$(name).exe
$(OUTD):
@mkdir $(OUTD)
$(OUTD)\$(name).exe : $(OUTD)/main.o $(proj_obj)
$(TCCDIR)\tcc.exe -o$(OUTD)\jwasm.exe $(OUTD)/main.o $(proj_obj)
clean:
@erase $(OUTD)\$(name).exe
@erase $(OUTD)\*.o