aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/buildsys/win/nmake-msvc.inc
blob: d19fd44ef7f1db00e2731d58361f236db001b858 (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
!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 and RTTI
CFLAGS=$(CFLAGS) /EHsc /GR

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

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

!ifdef DEBUG

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

LDFLAGS=$(LDFLAGS) /DEBUG

!else

!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)