File: Makefile.vc

package info (click to toggle)
mpdecimal 4.0.1-5
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,232 kB
  • sloc: ansic: 17,917; cpp: 6,508; sh: 4,236; makefile: 621; lisp: 502; python: 85; asm: 18
file content (59 lines) | stat: -rw-r--r-- 1,585 bytes parent folder | download
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

SRCDIR = ..\libmpdec
LIBSTATIC = libmpdec-4.0.1.lib
LIBSHARED = libmpdec-4.0.1.dll
LIBIMPORT = libmpdec-4.0.1.dll.lib

!if "$(DEBUG)" == "1"
OPT = /MTd /Od /Zi /EHsc
OPT_SHARED = /MDd /Od /Zi /EHsc
!else
OPT = /MT /O2 /GS /EHsc /DNDEBUG
OPT_SHARED = /MD /O2 /GS /EHsc /DNDEBUG
!endif

!if "$(CC)" == "clang-cl"
WARN = /W4 /wd4200 /wd4204 /wd4221 -Wno-undefined-inline /D_CRT_SECURE_NO_WARNINGS
!else
WARN = /W4 /wd4200 /wd4204 /wd4221 /D_CRT_SECURE_NO_WARNINGS
!endif

MPD_CFLAGS = $(WARN) /nologo $(OPT)
MPD_CFLAGS_SHARED = $(WARN) /nologo $(OPT_SHARED)


default: runtest runtest_shared copy_dll


runtest:\
Makefile runtest.c test.c $(SRCDIR)\io.h $(SRCDIR)\mpdecimal.h $(SRCDIR)\mpalloc.h test.h vctest.h \
$(SRCDIR)\$(LIBSTATIC)
	$(CC) -I$(SRCDIR) $(MPD_CFLAGS) /Fe:runtest runtest.c test.c $(SRCDIR)\$(LIBSTATIC)

runtest_shared:\
Makefile runtest.c test.c $(SRCDIR)/io.h $(SRCDIR)/mpdecimal.h $(SRCDIR)/mpalloc.h test.h vctest.h \
$(SRCDIR)/$(LIBSHARED) $(SRCDIR)/$(LIBIMPORT)
	$(CC) -I$(SRCDIR) $(MPD_CFLAGS_SHARED) /Fe:runtest_shared runtest.c test.c $(SRCDIR)\$(LIBIMPORT)

FORCE:

copy_dll:
	copy /y $(SRCDIR)\$(LIBSHARED) .

clean: FORCE
	-@if exist *.obj del *.obj
	-@if exist *.dll del *.dll
	-@if exist *.exp del *.exp
	-@if exist *.lib del *.lib
	-@if exist *.ilk del *.ilk
	-@if exist *.pdb del *.pdb
	-@if exist *.pgc del *.pgc
	-@if exist *.pgd del *.pgd
	-@if exist *.manifest del *.manifest
	-@if exist *.exe del *.exe

distclean: FORCE
	nmake clean
	-@if exist dectest.zip del dectest.zip
	-@if exist testdata rd /q /s testdata
	-@if exist Makefile del Makefile