1 objects_common
= fsm.o htable.o states.o
2 objects_rmcom
= test_rmcom.o
$(objects_common
)
3 objects_stress
= test_stress.o
$(objects_common
)
4 objects_thread
= test_thread.o
$(objects_common
)
6 files_common
= fsm.c ..
/..
/netbsd
/genstructs
/htable
/htable.c states.c
7 files_rmcom
= test_rmcom.c
$(files_common
)
8 files_stress
= test_stress.c
$(files_common
)
9 files_thread
= test_thread.c
$(files_common
)
11 libs_thread
= -lpthread
15 cflags = -Wall
-W
-Wextra
-Wformat-nonliteral
-Wcast-align
-Wpointer-arith \
16 -Wbad-function-cast
-Wmissing-prototypes
-Wstrict-prototypes \
17 -Wmissing-declarations
-Winline
-Wundef
-Wnested-externs
-Wcast-qual \
18 -Wshadow
-Wwrite-strings
-Wno-unused-parameter
-Wfloat-equal \
19 -Wswitch
-Wbad-function-cast
-pedantic
-ansi
-g
21 all: test_rmcom test_stress test_thread
23 test_rmcom
: $(objects_rmcom
)
24 $(cc) $(cflags) $(files_rmcom
) -o
$(dest
)/test_rmcom
26 test_stress
: $(objects_stress
)
27 $(cc) $(cflags) $(files_stress
) -o
$(dest
)/test_stress
29 test_thread
: $(objects_thread
)
30 $(cc) $(cflags) $(files_thread
) $(libs_thread
) -o
$(dest
)/test_thread
35 find .
-type f
-perm
-111 -exec
rm '{}' \
; # In Linux -111 should be /111
37 test_rmcom.o
: fsm.h states.h types.h
38 test_stress.o
: fsm.h states.h types.h
39 test_thread.o
: fsm.h states.h types.h
41 htable.o
: ..
/..
/netbsd
/genstructs
/htable
/htable.h
42 states.o
: states.h types.h