1 objects_common
= mpool.o
3 objects1
= test1.o
$(objects_common
)
4 objects2
= test2.o
$(objects_common
)
5 objects3
= test3.o mstat.o
$(objects_common
)
6 objects4
= test4.o mstat.o
$(objects_common
)
7 objects5
= test5.o
$(objects_common
)
10 files1
= test1.c
$(files_common
)
11 files2
= test2.c
$(files_common
)
12 files3
= test3.c mstat.c
$(files_common
)
13 files4
= test4.c mstat.c
$(files_common
)
14 files5
= test5.c
$(files_common
)
18 cflags = -Wall
-W
-Wextra
-Wformat-nonliteral
-Wcast-align
-Wpointer-arith \
19 -Wbad-function-cast
-Wmissing-prototypes
-Wstrict-prototypes \
20 -Wmissing-declarations
-Winline
-Wundef
-Wnested-externs
-Wcast-qual \
21 -Wshadow
-Wwrite-strings
-Wno-unused-parameter
-Wfloat-equal \
22 -Wswitch
-Wbad-function-cast
-pedantic
-ansi
-g
24 all: test1 test2 test3 test4 test5
27 $(cc) $(cflags) $(files1
) -o
$(dest
)/test1
30 $(cc) $(cflags) $(files2
) -o
$(dest
)/test2
33 $(cc) $(cflags) $(files3
) -o
$(dest
)/test3
36 $(cc) $(cflags) $(files4
) -o
$(dest
)/test4
39 $(cc) $(cflags) $(files5
) -o
$(dest
)/test5
44 find .
-type f
-perm
-111 -exec
rm '{}' \
; # In Linux -111 should be /111
48 test3.o
: mpool.h mstat.h
49 test4.o
: mpool.h mstat.h