aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/buildsys/win/nmake-msvc.inc
blob: b1fe1acc148ad85f2b8bb67aa78335e894ed5e3d (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
!ifdef MSVCPATH
INCPATH=$(INCPATH) /I$(MSVCPATH)\include 
LIBPATH=$(LIBPATH) /LIBPATH:$(MSVCPATH)\lib
!endif

##############################################

OBJPATH=$(OUTPATH)\$(OUTSUB)
TARGETPATH=$(OBJPATH)
TARGET=$(TARGETPATH)\$(OUTNAME).$(EXT)

##############################################
# use precompiled headers (automatic mode)

!ifdef PRECOMPILE
CFLAGS=$(CFLAGS) /YX$(PRECOMPILE) /Fp$(OBJPATH)\precompiled.pch
!endif

##############################################

# create code for DLL
CFLAGS=$(CFLAGS) /LD

# enable exception handling
CFLAGS=$(CFLAGS) /GX

# no banner
CFLAGS=$(CFLAGS) /nologo
LDFLAGS=$(LDFLAGS) /nologo

##############################################

CFLAGS=$(CFLAGS) $(UFLAGS)

!ifdef DEBUG

CFLAGS=$(CFLAGS) /D_DEBUG
!ifdef DYNAMIC
CFLAGS=$(CFLAGS) /MDd
!else
CFLAGS=$(CFLAGS) /MTd
!endif

LDFLAGS=$(LDFLAGS) /DEBUG

!else

CFLAGS=$(CFLAGS) $(OFLAGS) /DNDEBUG
!ifdef DYNAMIC
CFLAGS=$(CFLAGS) /MD
!else
CFLAGS=$(CFLAGS) /MT
!endif

LDFLAGS=$(LDFLAGS) /INCREMENTAL:NO 

!endif

##############################################
# convert both *.c and *.cpp

OBJSTMP= $(SRCS:.c=.obj)
OBJS= $(OBJSTMP:.objpp=.obj)