Dummy commit to test new ssh key
[eleutheria.git] / fsm / Makefile
blobc555e151a44d631327d1093189fcd5dadcc3d8db
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)
5 objects_dbg_fsm = dbg_fsm.o $(objects_common)
7 files_common = fsm.c ../genstructs/htable/htable.c states.c
8 files_rmcom = test_rmcom.c $(files_common)
9 files_stress = test_stress.c $(files_common)
10 files_thread = test_thread.c $(files_common)
11 files_dbg_fsm = dbg_fsm.c $(files_common)
13 libs_thread = -lpthread
15 dest = .
16 cc = gcc
17 cflags = -Wall -W -Wextra -Wformat-nonliteral -Wcast-align -Wpointer-arith \
18 -Wbad-function-cast -Wmissing-prototypes -Wstrict-prototypes \
19 -Wmissing-declarations -Winline -Wundef -Wnested-externs -Wcast-qual \
20 -Wshadow -Wwrite-strings -Wno-unused-parameter -Wfloat-equal \
21 -Wswitch -Wbad-function-cast -pedantic -ansi -g
23 all: test_rmcom test_stress test_thread dbg_fsm
25 test_rmcom: $(objects_rmcom)
26 $(cc) $(cflags) $(files_rmcom) -o $(dest)/test_rmcom
28 test_stress: $(objects_stress)
29 $(cc) $(cflags) $(files_stress) -o $(dest)/test_stress
31 test_thread: $(objects_thread)
32 $(cc) $(cflags) $(files_thread) $(libs_thread) -o $(dest)/test_thread
34 dbg_fsm: $(objects_dbg_fsm)
35 $(cc) $(cflags) $(files_dbg_fsm) $(libs_thread) -o $(dest)/dbg_fsm
37 clean:
38 rm -f *.o
39 rm -f *~
40 find . -type f -perm -111 -exec rm '{}' \; # In Linux -111 should be /111
42 test_rmcom.o: fsm.h states.h types.h
43 test_stress.o: fsm.h states.h types.h
44 test_thread.o: fsm.h states.h types.h
45 dbg_fsm: fsm.h states.h types.h
46 fsm.o: fsm.h types.h
47 htable.o: ../genstructs/htable/htable.h
48 states.o: states.h types.h