summaryrefslogtreecommitdiff
path: root/Makefile
blob: 9f48418d321c5b4c02925b54a47df1291ae6ad06 (plain)
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
.POSIX:

.SUFFIXES: .h .d

include config.mk

CC=c99
CFLAGS=-g -I$(INCLUDEDIR) -nostdinc -fno-builtin
LDFLAGS=-L$(LIBDIR) $(LIBS)

TESTOBJS=main.o \
	assert.o \
	complex.o \
	ctype.o \
	errno.o \
	fenv.o \
	float.o \
	inttypes.o \
	iso646.o \
	limits.o \
	locale.o \
	math.o \
	setjmp.o \
	signal.o \
	stdalign.o \
	stdarg.o \
	stdatomic.o \
	stdbool.o \
	stddef.o \
	stdint.o \
	stdio.o \
	stdlib.o \
	stdnoreturn.o \
	string.o \
	tgmath.o \
	threads.o \
	time.o \
	uchar.o \
	wchar.o \
	wctype.o \
	test.o

testlibc: $(TESTOBJS) $(LIBDIR)/libc.a
	$(CC) -o $@ $(TESTOBJS) $(LDFLAGS)

assert.o: assert.c test.h
complex.o: complex.c test.h
ctype.o: ctype.c test.h
errno.o: errno.c test.h
fenv.o: fenv.c test.h
float.o: float.c test.h _float.h
inttypes.o: inttypes.c test.h
iso646.o: iso646.c test.h
limits.o: limits.c test.h
locale.o: locale.c test.h
math.o: math.c test.h _math.h
setjmp.o: setjmp.c test.h
signal.o: signal.c test.h
stdalign.o: stdalign.c test.h _stdalign.h
stdard.o: stdarg.c test.h
stdatomic.o: stdatomic.c test.h
stdbool.o: stdbool.c test.h
stddef.o: stddef.c test.h
stdint.o: stdint.c test.h
stdio.o: stdio.c test.h
stdlib.o: stdlib.c test.h
stdnoreturn.o: stdnoreturn.c test.h
string.o: string.c test.h
tgmath.o: tgmath.c test.h
threads.o: threads.c test.h
time.o: time.c test.h
uchar.o: uchar.c test.h
wchar.o: wchar.c test.h
wctype.o: wctype.c test.h

test.o: test.c test.h
main.o: main.c test.h

.d.h:
	awk '{printf("#ifndef %s\n#error %s not defined\n#endif\n", $$0, $$0);}' $< > $@

clean:
	rm -f *.o testlibc