-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.vc
72 lines (55 loc) · 1.87 KB
/
Makefile.vc
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
#
# Makefile.vc
#
# Provide error checked version of various functions from std C library.
#
# Created on 3 July 2011, by Martin Moene
#
# Copyright 2011 Universiteit Leiden
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#
CFLAGS = -nologo -W4 -D_CRT_SECURE_NO_WARNINGS $(LANOPT)
{src}.c{lib}.obj:
$(CC) $(CFLAGS) -c -Fo$* $<
{doc\src}.c{test}.obj:
$(CC) $(CFLAGS) -Isrc -c -Fo$* $<
all: lib test doc
clean:
-del *.bak
-del *.obj
-del lib\*.obj
-del src\*.bak
-del test\*.obj
-del doc\src\*.bak
-del doc\src\*.obj
distclean: clean
-del doc\*.chm
-del test\ecore.exe
-del test\emalloc.exe
-del test\estdio.exe
-del lib\libstdc-error.lib
lib: lib/libstdc-error.lib
test: test\ecore.exe test\emalloc.exe test\estdio.exe
doc: examples doc/libstdc-error.chm
examples: test\ex-ecore.obj test\ex-emalloc.obj test\ex-estdio.obj
test\ex-ecore.obj: doc\src\ex-ecore.c
test\ex-emalloc.obj: doc\src\ex-emalloc.c
test\ex-estdio.obj: doc\src\ex-estdio.c
lib/libstdc-error.lib: lib\ecore.obj lib\emalloc.obj lib\estdio.obj
lib /out:lib\libstdc-error.lib lib\ecore.obj lib\emalloc.obj lib\estdio.obj
test\ecore.exe: src\ecore.c src\ecore.h
$(CC) $(CFLAGS) -DTEST_ERROR -Fetest\ecore.exe src\ecore.c /link lib\libstdc-error.lib
test\emalloc.exe: src\ecore.c src\ecore.h src\emalloc.c src\emalloc.h
$(CC) $(CFLAGS) -DTEST_EMALLOC -Fetest\emalloc.exe src\emalloc.c /link lib\libstdc-error.lib
test\estdio.exe: src\ecore.c src\ecore.h src\estdio.c src\estdio.h
$(CC) $(CFLAGS) -DTEST_ESTDIO -Fetest\estdio.exe src\estdio.c /link lib\libstdc-error.lib
doc\libstdc-error.chm: src\ecore.c src\ecore.h src\emalloc.c src\emalloc.h src\estdio.c src\estdio.h \
ex-ecore.c ex-emalloc.c ex-estdio.c
cd doc
doxygen
cd ..
#
# End of file
#