File: Makefile.msvc

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (84 lines) | stat: -rw-r--r-- 2,242 bytes parent folder | download | duplicates (19)
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
##
## Name:     Makefile.msvc
## Purpose:  Makefile for IMath library and associated tools
##           for Microsoft Visual Studio 2005
## Author:   Matus Horvath <matus.horvath@nextra.sk>
##
## Copyright (C) 2006 Matus Horvath.  Permission has been granted to use,
## modify, and redistribute this file according to the terms of the IMath
## license.
##
## Usage: nmake /f Makefile.msvc
##

# --- begin configuration section ---

## Settings for Microsoft Windows systems using nmake.
## To build with debugging, add DEBUG=Y on the "nmake" command line.
CC=cl.exe
LD=link.exe
CFLAGS=$(CFLAGS) -nologo -I. -D_CRT_SECURE_NO_DEPRECATE $(DCFLAGS)
LDFLAGS=$(LDFLAGS) -nologo $(DLDFLAGS)
LIBS=$(DLIBS)

!if "$(DEBUG)" == "Y"
DCFLAGS=-ZI -Od -DDEBUG=1 -DTRACEABLE_FREE=1
DLDFLAGS=-DEBUG
#DLIBS=-lefence
!else
DCFLAGS=-O2 -Ob2
DLDFLAGS=
#DLIBS=
!endif

## Visual Studio C/C++ 2005 compiler supports "long long" 64-bit type.  
CFLAGS=$(CFLAGS) -DUSE_LONG_LONG

# --- end of configuration section ---
TARGETS=imtest.exe pi.exe bintest.exe findprime.exe
HDRS=imath.h imrat.h iprime.h imdrover.h rsamath.h
SRCS=$(HDRS:.h=.c) $(TARGETS:.exe=.c)
OBJS=$(SRCS:.c=.obj)
EXAMPLES=input.exe basecvt.exe rounding.exe

.c.obj:
	$(CC) $(CFLAGS) -c $<

all: objs examples test

objs: $(OBJS)

# Because Visual Studio does not permit Unix shell syntax, you will
# have to run the tests manually once the "test" target is built.
test: imtest.exe pi.exe
#	@ echo ""
#	@ echo "Running tests, you should not see any 'FAILED' lines here."
#	@ echo "If you do, please see doc.txt for how to report a bug."
#	@ echo ""
#	(cd tests && ./test.sh)

$(EXAMPLES): imath.obj imrat.obj iprime.obj examples/$*.obj
	@move $*.obj examples/$*.obj
	$(LD) $(LDFLAGS) -out:$@ $** $(LIBS)

examples: $(EXAMPLES)

imtest.exe: imtest.obj imath.obj imrat.obj imdrover.obj
	$(LD) $(LDFLAGS) -out:$@ $** $(LIBS)

pi.exe: pi.obj imath.obj
	$(LD) $(LDFLAGS) -out:$@ $** $(LIBS)

findprime.exe: findprime.obj imath.obj iprime.obj
	$(LD) $(LDFLAGS) -out:$@ $** $(LIBS)

rtest.exe: rtest.obj imath.obj rsamath.obj
	$(LD) $(LDFLAGS) -out:$@ $** $(LIBS)

bintest.exe: imath.obj bintest.obj
	$(LD) $(LDFLAGS) -out:$@ $** $(LIBS)

clean:
	del /q /f *.exe *.obj examples\*.obj

# End of Makefile.msvc