-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
executable file
·43 lines (34 loc) · 1.27 KB
/
Makefile
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
TEST_PROC_SRC := Process_Test/test_pr.c
TEST_PROC_EXE := Process_Test/test_pr.out
TEST_PTHREAD_SRC := Pthread_Test/test_pthread.c
TEST_PTHREAD_EXE := Pthread_Test/test_pthread.out
PTHREAD_LIB := -lpthread
#Target option for compiling and loading kernel module.
load:
cd scheduler && make load
#Target option for unloading and cleaning the generated kernel modules.
unload:
cd scheduler && make unload
#Target option for compiling the test_process program.
comp_pr_test:
gcc $(TEST_PROC_SRC) -o $(TEST_PROC_EXE)
#Target option for running the test_process program.
pr_test: comp_pr_test
./$(TEST_PROC_EXE)
#Target option for compiling the test_pthread program.
comp_pthread_test:
gcc $(TEST_PTHREAD_SRC) -o $(TEST_PTHREAD_EXE) $(PTHREAD_LIB)
#Target option for running the test_pthread program.
pthread_test: comp_pthread_test
./$(TEST_PTHREAD_EXE)
#Target option for cleaning the generated kernel modules.
clean_modules:
cd scheduler && make clean
#Target option for cleaning the test_process program.
clean_pr_test:
rm -f $(TEST_PROC_EXE)
#Target option for cleaning the test_process program.
clean_pthread_test:
rm -f $(TEST_PTHREAD_EXE)
#Target option for cleaning the test_process program and the generated kernel modules
cleanall: clean_pr_test clean_pthread_test clean_modules