File: Makefile.win

package info (click to toggle)
libcrcutil 1.0-5.4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,212 kB
  • sloc: cpp: 4,237; sh: 1,112; ansic: 191; makefile: 54; awk: 17
file content (79 lines) | stat: -rw-r--r-- 2,076 bytes parent folder | download | duplicates (11)
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
Makefile=Makefile.win

CL_FLAGS=-Wall -O2 -nologo -DCRCUTIL_USE_MM_CRC32=0
ICL_FLAGS=-Wall -O3 -Qdiag-disable:181 -Qdiag-disable:185 -Qdiag-disable:442 -Qdiag-disable:vec -DCRCUTIL_USE_MM_CRC32=0
INCLUDES=-Icode

all:
  @echo Please run "nmake target" where "target" is one of:
  @echo cl64  - 64-bit Microsoft compiler
  @echo cl32  - 32-bit Microsoft compiler
  @echo icl64 - 64-bit Intel compiler
  @echo icl32 - 32-bit Intel compiler


cl64:
  @call "%VCINSTALLDIR%\bin\amd64\vcvarsamd64.bat" && nmake -nologo -f $(Makefile) CC_FLAGS="$(CL_FLAGS) -Icode -Itests" CC=cl.exe configured

cl32:
  @call "%VCINSTALLDIR%\bin\vcvars32.bat" && nmake -nologo -f $(Makefile) CC_FLAGS="$(CL_FLAGS) -Icode -Itests" CC=cl.exe configured

icl64:
  @call "%ICPP_COMPILER11%bin\iclvars.bat" intel64 && nmake -nologo -f $(Makefile) CC_FLAGS="$(ICL_FLAGS) -Icode -Itests" CC=icl.exe configured

icl32:
  @call "%ICPP_COMPILER11%bin\iclvars.bat" ia32 && nmake -nologo -f $(Makefile) CC_FLAGS="$(ICL_FLAGS) -Icode -Itests" CC=icl.exe configured


clean:
  del /q *.obj *.asm *.exe *.pdb *.suo


TARGETS=unittest.exe example.exe

COMMON_CODE=\
  code/crc32c_sse4.cc \
  code/multiword_64_64_cl_i386_mmx.cc

COMMON_HEADERS=\
  code/base_types.h \
  code/crc32c_sse4.h \
  code/crc32c_sse4_intrin.h \
  code/crc_casts.h \
  code/generic_crc.h \
  code/gf_util.h \
  code/platform.h \
  code/protected_crc.h \
  code/rolling_crc.h \
  code/std_headers.h \
  code/uint128_sse2.h

UNITTEST_CODE=\
  tests/unittest.cc \
  tests/set_hi_pri.c \
  $(COMMON_CODE)

UNITTEST_HEADERS=\
  tests/aligned_alloc.h \
  tests/bob_jenkins_rng.h \
  tests/rdtsc.h \
  tests/unittest.h \
  tests/unittest_helper.h \
  $(COMMON_HEADERS)

EXAMPLE_CODE=\
  examples/usage.cc \
  examples/interface.cc \
  $(COMMON_CODE)

EXAMPLE_HEADERS=\
  examples/interface.h \
  $(COMMON_HEADERS)

configured: $(TARGETS)

unittest.exe: $(Makefile) $(UNITTEST_CODE) $(UNITTEST_HEADERS)
  $(CC) $(CC_FLAGS) $(UNITTEST_CODE)

example.exe: $(Makefile) $(EXAMPLE_CODE) $(EXAMPLE_HEADERS)
  $(CC) $(CC_FLAGS) -Iexamples $(EXAMPLE_CODE)