forked from martinmoene/libstdc-error
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.gcc
More file actions
57 lines (42 loc) · 1.49 KB
/
Makefile.gcc
File metadata and controls
57 lines (42 loc) · 1.49 KB
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
#
# Makefile.gcc
#
# 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)
#
#CC set on commandline as CC = gcc, or CC=g++
CFLAGS = -Wall
VPATH = src:lib:test:doc/src
SHELL = bash # requires bash to be in path; needed for ( cmd1; cmd2 )
.c.o:
$(CC) $(CFLAGS) -Isrc -c $^ -o lib/$@
all: lib test doc
clean:
-rm *.bak *.o lib/*.o test/*.o doc/src/*.o
distclean: clean
-rm doc/*.chm test/ecore.exe test/emalloc.exe test/estdio.exe lib/libstdc-error.a
-rm -rf doc/html
lib: lib/libstdc-error.a
test: ecore.exe emalloc.exe estdio.exe
doc: examples doc/libstdc-error.chm
examples: ex-ecore.o ex-emalloc.o ex-estdio.o
lib/libstdc-error.a: ecore.o emalloc.o estdio.o
$(AR) rcs lib/libstdc-error.a lib/ecore.o lib/emalloc.o lib/estdio.o
ecore.exe: ecore.c ecore.h
$(CC) $(CFLAGS) -DTEST_ERROR -o test/ecore.exe $^ -L lib -l stdc-error
emalloc.exe: ecore.c ecore.h emalloc.c emalloc.h
$(CC) $(CFLAGS) -DTEST_EMALLOC -o test/emalloc.exe $^ -L lib -l stdc-error
estdio.exe: ecore.c ecore.h estdio.c estdio.h
$(CC) $(CFLAGS) -DTEST_ESTDIO -o test/estdio.exe $^ -L lib -l stdc-error
doc/libstdc-error.chm: ecore.c ecore.h emalloc.c emalloc.h estdio.c estdio.h \
ex-ecore.c ex-emalloc.c ex-estdio.c
( cd doc; doxygen )
#
# End of file
#