aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpzread <netfirewall@gmail.com>2012-12-10 21:12:23 +0800
committerpzread <netfirewall@gmail.com>2012-12-10 21:12:23 +0800
commita5e3f3a362cd3a76cb5135dcd8439bf99e0e1d91 (patch)
treeb91704c55828136b5f2351096926b8f3788f6740
parent6342273bf29274f1fd7cac7c31fddf3cc1c7f05f (diff)
downloadtaiwan-online-judge-a5e3f3a362cd3a76cb5135dcd8439bf99e0e1d91.tar
taiwan-online-judge-a5e3f3a362cd3a76cb5135dcd8439bf99e0e1d91.tar.gz
taiwan-online-judge-a5e3f3a362cd3a76cb5135dcd8439bf99e0e1d91.tar.bz2
taiwan-online-judge-a5e3f3a362cd3a76cb5135dcd8439bf99e0e1d91.tar.lz
taiwan-online-judge-a5e3f3a362cd3a76cb5135dcd8439bf99e0e1d91.tar.xz
taiwan-online-judge-a5e3f3a362cd3a76cb5135dcd8439bf99e0e1d91.tar.zst
taiwan-online-judge-a5e3f3a362cd3a76cb5135dcd8439bf99e0e1d91.zip
Add Makefile
-rw-r--r--judge/Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/judge/Makefile b/judge/Makefile
new file mode 100644
index 0000000..ea9ce41
--- /dev/null
+++ b/judge/Makefile
@@ -0,0 +1,17 @@
+ifneq ($(KERNELRELEASE),)
+ judgm-objs := judgm_mod.o judgm_proc.o judgm_syscall.o judgm_syscall_asm.o judgm_security.o
+ obj-m := judgm.o
+else
+ KERNEL_SOURCE := /usr/lib/modules/$(shell uname -r)/build
+ PWD := $(shell pwd)
+default:
+ ${MAKE} -C ${KERNEL_SOURCE} SUBDIRS=${PWD} modules
+ gcc judge_app.c judge_server.c -lcap -ldl -pthread -lpq -o judge
+ gcc -shared -fPIC judgx_lib.c -o libjudgx.so
+ gcc -shared -fPIC -fvisibility=hidden -O2 line.c -Wl,-rpath,'$$ORIGIN' -L. -ljudgx -lrt -pthread -o line.so
+ gcc -shared -fPIC -fvisibility=hidden -O2 check.c -Wl,-rpath,'$$ORIGIN' -L. -ljudgx -pthread -o check.so
+ gcc -shared -fPIC -fvisibility=hidden -O2 line_vscore.c -Wl,-rpath,'$$ORIGIN' -L. -ljudgx -lrt -pthread -o line_vscore.so
+ gcc -shared -fPIC -fvisibility=hidden -O2 check_reactgrader.c -Wl,-rpath,'$$ORIGIN' -L. -ljudgx -pthread -o check_reactgrader.so
+clean:
+ ${MAKE} -C ${KERNEL_SOURCE} SUBDIRS=${PWD} clean
+endif