├── AUTHORS ├── NEWS ├── po ├── ChangeLog ├── LINGUAS └── POTFILES.in ├── ChangeLog ├── README ├── doc └── config.json.example ├── .gitignore ├── Makefile.am ├── default-install.sh ├── src ├── Makefile.am ├── okcalls32.h ├── version.cc ├── okcalls64.h ├── daemon.cc ├── udp-listen.cc ├── wzoj-judger.h ├── sim.cc ├── http.cc ├── main.cc ├── json │ └── json-forwards.h ├── judger.cc └── Makefile.in ├── configure.ac ├── autogen.sh ├── Makefile.in └── COPYING /AUTHORS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /po/ChangeLog: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # please keep this list sorted alphabetically 2 | # 3 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | # List of source files containing translatable strings. 2 | 3 | src/main.c 4 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | # wzoj-judger 2 | 在线评测系统 [WZOJ](https://github.com/massimodong/wzoj) 的评测机。 3 | 感谢 [hustoj](https://github.com/zhblue/hustoj) 4 | -------------------------------------------------------------------------------- /doc/config.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "url": "localhost/", 3 | "token": "token", 4 | "sleep_time": 10, 5 | "max_running": 1, 6 | "sim_check": false 7 | } 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .anjuta* 2 | *.anjuta 3 | Debug 4 | INSTALL 5 | aclocal.m4 6 | autom4te.cache 7 | compile 8 | config.guess 9 | config.h.in 10 | config.sub 11 | configure 12 | depcomp 13 | install-sh 14 | intltool-extract.in 15 | intltool-merge.in 16 | intltool-update.in 17 | ltmain.sh 18 | missing 19 | po/Makefile.in.in 20 | *~ 21 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | ## Created by Anjuta 3 | 4 | SUBDIRS = src po 5 | 6 | dist_doc_DATA = \ 7 | README \ 8 | COPYING \ 9 | AUTHORS \ 10 | ChangeLog \ 11 | INSTALL \ 12 | NEWS 13 | 14 | 15 | INTLTOOL_FILES = intltool-extract.in \ 16 | intltool-merge.in \ 17 | intltool-update.in 18 | 19 | EXTRA_DIST = \ 20 | $(INTLTOOL_FILES) 21 | 22 | DISTCLEANFILES = intltool-extract \ 23 | intltool-merge \ 24 | intltool-update \ 25 | po/.intltool-merge-cache 26 | 27 | 28 | # Remove doc directory on uninstall 29 | uninstall-local: 30 | -rm -r $(docdir) 31 | -------------------------------------------------------------------------------- /default-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$(id -u)" != "0" ];then 4 | echo "This script must be run as root" 1>&2 5 | exit 1 6 | fi 7 | 8 | JUDGERNAME="judger"; 9 | JUDGERUID=1537; 10 | 11 | if id -u $JUDGERNAME > /dev/null;then 12 | echo "User Exists"; 13 | else 14 | echo "Creating user and directory" 15 | mkdir -p /home/$JUDGERNAME 16 | mkdir -p /home/$JUDGERNAME/etc 17 | mkdir -p /home/$JUDGERNAME/sim 18 | cp ./doc/config.json.example /home/$JUDGERNAME/etc/config.json 19 | 20 | useradd -u $JUDGERUID -d /home/$JUDGERNAME -s /bin/bash $JUDGERNAME 21 | 22 | chown -R $JUDGERNAME:$JUDGERNAME /home/$JUDGERNAME 23 | fi 24 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | ## Created by Anjuta 4 | 5 | AM_CPPFLAGS = \ 6 | -DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \ 7 | -DPACKAGE_SRC_DIR=\""$(srcdir). \ 8 | $(LIBCURL_CFLAGS). \ 9 | $(jsoncpp_CFLAGS). \ 10 | $(jsoncpp_CFLAGS)"\" \ 11 | -DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" 12 | 13 | AM_CFLAGS =\ 14 | -Wall\ 15 | -g 16 | 17 | bin_PROGRAMS = wzoj_judger 18 | 19 | wzoj_judger_SOURCES = \ 20 | main.cc \ 21 | wzoj-judger.h \ 22 | version.cc \ 23 | daemon.cc \ 24 | http.cc \ 25 | jsoncpp.cpp \ 26 | json/json-forwards.h \ 27 | json/json.h \ 28 | judger.cc \ 29 | okcalls64.h \ 30 | okcalls32.h \ 31 | sim.cc \ 32 | udp-listen.cc 33 | 34 | wzoj_judger_CXXFLAGS = -std=c++11 35 | 36 | wzoj_judger_LDFLAGS = 37 | 38 | wzoj_judger_LDADD = $(LIBCURL_LIBS) 39 | 40 | 41 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | dnl Process this file with autoconf to produce a configure script. 2 | dnl Created by Anjuta application wizard. 3 | 4 | AC_INIT(wzoj_judger, 0.1) 5 | 6 | AC_CONFIG_HEADERS([config.h]) 7 | 8 | AM_INIT_AUTOMAKE([1.11]) 9 | 10 | AM_SILENT_RULES([yes]) 11 | 12 | AC_PROG_CXX 13 | 14 | 15 | 16 | 17 | dnl *************************************************************************** 18 | dnl Internationalization 19 | dnl *************************************************************************** 20 | IT_PROG_INTLTOOL([0.35.0]) 21 | 22 | GETTEXT_PACKAGE=wzoj_judger 23 | AC_SUBST(GETTEXT_PACKAGE) 24 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name]) 25 | AM_GLIB_GNU_GETTEXT 26 | 27 | 28 | 29 | 30 | 31 | LT_INIT 32 | 33 | 34 | 35 | 36 | 37 | PKG_CHECK_MODULES(LIBCURL,libcurl) 38 | 39 | AC_OUTPUT([ 40 | Makefile 41 | src/Makefile 42 | po/Makefile.in 43 | ]) 44 | -------------------------------------------------------------------------------- /src/okcalls32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * okcalls32.h 3 | * 4 | * Copyright (C) 2016 - Unknown 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | int LANG_CV[256] = { 85, 8,140,146, SYS_time, SYS_read, SYS_uname, SYS_write, SYS_open, 20 | SYS_close, SYS_execve, SYS_access, SYS_brk, SYS_munmap, SYS_mprotect, 21 | SYS_mmap2, SYS_fstat64, SYS_set_thread_area, 252, 0 }; 22 | 23 | int LANG_PV[256] = { 0,9, 59, 97, 13, 16, 89, 140, 91, 175, 195, 13, SYS_open, SYS_set_thread_area, 24 | SYS_brk, SYS_read, SYS_uname, SYS_write, SYS_execve, SYS_ioctl, 25 | SYS_readlink, SYS_mmap, SYS_rt_sigaction, SYS_getrlimit, 252, 191, 0 }; 26 | 27 | int LANG_YV[256] = {3,4,5,6,11,33,45,54,85,91,122,125,140,174,175,183,191,192,195, 28 | 196,197,199,200,201,202,220,240,243,252,258,295,311, 146, 29 | SYS_mremap, 158, 117, 60, 39, 102, SYS_access, 30 | SYS_brk, SYS_close, SYS_execve, SYS_exit_group, SYS_fcntl64, 31 | SYS_fstat64, SYS_futex, SYS_getcwd, SYS_getdents64, SYS_getegid32, 32 | SYS_geteuid32, SYS_getgid32, SYS_getrlimit, SYS_getuid32, SYS_ioctl, 33 | SYS__llseek, SYS_lstat64, SYS_mmap2, SYS_mprotect, SYS_munmap, SYS_open, 34 | SYS_read, SYS_readlink, SYS_rt_sigaction, SYS_rt_sigprocmask, 35 | SYS_set_robust_list, SYS_set_thread_area, SYS_set_tid_address, 36 | SYS_stat64, SYS_uname, SYS_write,0 }; -------------------------------------------------------------------------------- /src/version.cc: -------------------------------------------------------------------------------- 1 | // version.cc 2 | // 3 | // Copyright (C) 2016 - Unknown 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; either version 2 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program. If not, see . 17 | 18 | #include 19 | 20 | const char version[] = "0.1"; 21 | 22 | void print_version(){ 23 | std::cout<<"wzoj-judger (WZOJ) "<\n\ 26 | This is free software: you are free to change and redistribute it.\n\ 27 | There is NO WARRANTY, to the extent permitted by law.\n"; 28 | } 29 | 30 | void print_help(){ 31 | printf("Usage: %s [OPTION]...\n",OJ_PROGRAMNAME); 32 | printf("Judger for WZMS ONLINE JUDGE\n"); 33 | puts(""); 34 | fputs("\ 35 | -h, --help display this help and exit\n\ 36 | -v, --version display version information and exit\n", 37 | stdout); 38 | 39 | puts(""); 40 | fputs("\ 41 | -d, --debug debug mode\n\ 42 | -c, --cd=PATH change judger's home directory\n\ 43 | -a, --once exit after first solution\n\ 44 | -s, --solution=sid judge sid and exit\n", 45 | stdout); 46 | 47 | puts(""); 48 | fputs("Report bugs to: dongmassimo@gmail.com\n\ 49 | pkg home page: \n\ 50 | General help using GNU software: \n" 51 | ,stdout); 52 | } -------------------------------------------------------------------------------- /src/okcalls64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * okcalls64.h 3 | * 4 | * Copyright (C) 2016 - Unknown 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | int LANG_CV[256] = {0,1,2,4,5,9,10,11,12,20,21,59,63,89,158,218,231,240, 262,273,302,318,334, 8, 21 | SYS_time, SYS_read, SYS_uname, SYS_write, SYS_open, 22 | SYS_close, SYS_execve, SYS_access, SYS_brk, SYS_munmap, SYS_mprotect, 23 | SYS_mmap, SYS_fstat, SYS_set_thread_area, 252, SYS_arch_prctl, 231, 0 }; 24 | 25 | int LANG_PV[256] = {0,1,2,4,9,10,11,13,16,59,89,97,201,231, 26 | SYS_open, SYS_set_thread_area, SYS_brk, SYS_read, 27 | SYS_uname, SYS_write, SYS_execve, SYS_ioctl, SYS_readlink, SYS_mmap, 28 | SYS_rt_sigaction, SYS_getrlimit, 252, 191, 158, 231, SYS_close, 29 | SYS_exit_group, SYS_munmap, SYS_time, 4, 0 }; 30 | 31 | int LANG_YV[256] = { 0,1,2,3,4,5,6,8,9,10,11,12,13,14,16,17,21,32,39,41,42,59, 32 | 72,78,79,89,97,99,102,104,107,108,131,158,202,218,231,257,273 33 | , 146, SYS_mremap, 158, 117, 60, 102, 191, 217, 302, 318, 34 | SYS_access, SYS_arch_prctl, SYS_brk, SYS_close, SYS_execve, 35 | SYS_exit_group, SYS_fcntl, SYS_fstat, SYS_futex, SYS_getcwd, 36 | SYS_getdents, SYS_getegid, SYS_geteuid, SYS_getgid, SYS_getrlimit, 37 | SYS_getuid, SYS_ioctl, SYS_lseek, SYS_lstat, SYS_mmap, SYS_mprotect, 38 | SYS_munmap, SYS_open, SYS_read, SYS_readlink, SYS_rt_sigaction, 39 | SYS_rt_sigprocmask, SYS_set_robust_list, SYS_set_tid_address, SYS_stat, 40 | SYS_write, 0 }; -------------------------------------------------------------------------------- /src/daemon.cc: -------------------------------------------------------------------------------- 1 | // daemon.cc 2 | // 3 | // Copyright (C) 2016 - Unknown 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; either version 2 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program. If not, see . 17 | #include 18 | #include 19 | 20 | void get_jobs(std::vector &); 21 | 22 | bool daemon_work(){ 23 | std::vector jobs; 24 | static pid_t ID[100]={0}; 25 | static int work_cnt = 0; 26 | 27 | get_jobs(jobs); 28 | if(OJ_DEBUG){ 29 | for(auto const &p: jobs){ 30 | std::cout<= OJ_MAXRUNNING){ 44 | pid_t tpid = waitpid(-1,NULL,0); 45 | for(i=0;i &jobs){ 71 | std::map par; 72 | Json::Value sols = http_get("/judger/pending-solutions",par); 73 | //std::cout<<"get val:\n"<. 17 | 18 | #define OJ_UDP_PORT 13107 19 | #define UDP_BUFF_SIZE 2048 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | int create_udp_socket(){ 28 | int ret_socket; 29 | while ((ret_socket = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { 30 | std::cerr<<"Failed to create socket, retrying."< 0) { 58 | printf("received message: \"%s\"\n", buff); 59 | } 60 | } 61 | } 62 | 63 | void clear_udp_buffer(int s){ 64 | char buff[UDP_BUFF_SIZE]; 65 | pollfd poll_list[1]; 66 | poll_list[0].fd = s; 67 | poll_list[0].events = POLLIN|POLLPRI; 68 | while(poll(poll_list,(unsigned long)1,0) > 0){ 69 | recv_udp_data(s, buff); 70 | } 71 | } 72 | 73 | void listen_udp(){ 74 | int udp_socket = create_udp_socket(); 75 | char buff[UDP_BUFF_SIZE]; 76 | 77 | while(daemon_work()); 78 | 79 | while(true){ 80 | recv_udp_data(udp_socket, buff); 81 | if(!strcmp(buff, OJ_TOKEN)){ 82 | clear_udp_buffer(udp_socket); 83 | while(daemon_work()); 84 | } 85 | } 86 | 87 | close(udp_socket); 88 | } -------------------------------------------------------------------------------- /src/wzoj-judger.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wzoj-judger.h 3 | * 4 | * Copyright (C) 2016 - Unknown 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program. If not, see . 18 | */ 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | #define OJ_WT0 0 36 | #define OJ_WT1 1 37 | #define OJ_CI 2 38 | #define OJ_RI 3 39 | #define OJ_AC 4 40 | #define OJ_PE 5 41 | #define OJ_WA 6 42 | #define OJ_TL 7 43 | #define OJ_ML 8 44 | #define OJ_OL 9 45 | #define OJ_RE 10 46 | #define OJ_CE 11 47 | #define OJ_CO 12 48 | #define OJ_TR 13 49 | 50 | const uid_t JUDGER_UID = 1537; 51 | const int MAX_TIME_LIMIT = 60000; // 1min 52 | const double MAX_MEM_LIMIT = 2048.00; // 2GB 53 | 54 | const int SL_PENDING = 0; 55 | const int SL_PENDING_REJUDGING = 1; 56 | const int SL_COMPILING = 2; 57 | const int SL_RUNNING = 3; 58 | const int SL_JUDGED = 4; 59 | const int SL_CANCELED = 5; 60 | 61 | extern int OJ_DEBUG; 62 | extern char *OJ_PROGRAMNAME; 63 | extern char *OJ_HOME; 64 | extern bool OJ_ONCE; 65 | extern int OJ_SOLUTION_NO; 66 | 67 | extern const char *OJ_URL; 68 | extern const char *OJ_TOKEN; 69 | extern int OJ_MAXRUNNING; 70 | extern int OJ_SLEEPTIME; 71 | 72 | /** 73 | * version 74 | */ 75 | void print_version(); 76 | void print_help(); 77 | 78 | /** 79 | * daemon 80 | */ 81 | bool daemon_work(); 82 | 83 | /** 84 | * http 85 | */ 86 | void init_http(); 87 | Json::Value http_get(std::string, std::map); 88 | Json::Value http_post(std::string, std::map); 89 | 90 | /** 91 | * judger 92 | **/ 93 | void judge_solution(int,int); 94 | int execute_cmd(const char * fmt, ...); 95 | Json::Value get_solution(int); 96 | 97 | /** 98 | * sim 99 | **/ 100 | void sim_daemon(); 101 | void sim_wake(); 102 | void sim_kill(); 103 | 104 | /** 105 | * udp 106 | **/ 107 | void listen_udp(); -------------------------------------------------------------------------------- /src/sim.cc: -------------------------------------------------------------------------------- 1 | // sim.cc 2 | // 3 | // Copyright (C) 2017 - Unknown 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; either version 2 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program. If not, see . 17 | #include 18 | #include 19 | const char *Extention[] = {"c", "cc", "pas", "java", "py"}; 20 | const char *SimExtention[] = {"c", "c++", "pasc", "java", "text"}; 21 | 22 | bool isNum(char c){ 23 | return '0' <= c && c <= '9'; 24 | } 25 | 26 | pid_t daemon_pid; 27 | 28 | void sim_wake(){ 29 | } 30 | 31 | void sim_kill(){ 32 | kill(daemon_pid, SIGKILL); 33 | } 34 | 35 | void sim_get_solutions(std::vector &sid){ 36 | std::map par; 37 | Json::Value sols = http_get("/judger/get-sim-solutions",par); 38 | for(int i=0;i par; 78 | par["solution_id"] = std::to_string(sid); 79 | par["solution2_id"] = std::to_string(s2id); 80 | par["rate"] = std::to_string(rate); 81 | http_post("/judger/update-sim", par); 82 | } 83 | 84 | void sim_work(int sid){ 85 | if(OJ_DEBUG){ 86 | std::cout<<"sim working on solution "<d_name[0] != '.'){ 113 | fprintf(files, "%s/%s\n", data_dir.c_str(), dirp->d_name); 114 | } 115 | } 116 | closedir(dp); 117 | 118 | fclose(files); 119 | 120 | //new source file 121 | FILE *new_src = fopen((data_dir + 122 | std::to_string(sid) + "." + Extention[language]).c_str(), "w"); 123 | fputs(solution["code"].asString().c_str(), new_src); 124 | fclose(new_src); 125 | 126 | 127 | execute_cmd("sim_%s -i -pP -ae -osim.out -T -t 10 < files.txt", SimExtention[language]); 128 | 129 | int s2id=0, rate = 0; 130 | sim_read_report(sid, s2id, rate); 131 | 132 | update_sim(sid, s2id, rate); 133 | 134 | if(rate > 80){//delete similiar codes 135 | execute_cmd ("rm %s/%d.%s", data_dir.c_str(),sid, Extention[language]); 136 | } 137 | } 138 | 139 | void sim_set_workdir(){ 140 | std::string workdir = std::string(OJ_HOME) + "/sim"; 141 | chown(workdir.c_str(), JUDGER_UID, JUDGER_UID); 142 | chdir(workdir.c_str()); 143 | } 144 | 145 | void sim_daemon(){ 146 | std::vector solutions_id; 147 | daemon_pid = fork(); 148 | if(daemon_pid != 0){ 149 | if(OJ_DEBUG){ 150 | std::cout<<"sim daemon pid:"< /dev/null 2>&1 || { 24 | echo 25 | echo "**Error**: You must have \`autoconf' installed." 26 | echo "Download the appropriate package for your distribution," 27 | echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" 28 | DIE=1 29 | } 30 | 31 | (grep "^IT_PROG_INTLTOOL" $srcdir/configure.ac >/dev/null) && { 32 | (intltoolize --version) < /dev/null > /dev/null 2>&1 || { 33 | echo 34 | echo "**Error**: You must have \`intltool' installed." 35 | echo "You can get it from:" 36 | echo " ftp://ftp.gnome.org/pub/GNOME/" 37 | DIE=1 38 | } 39 | } 40 | 41 | (grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.ac >/dev/null) && { 42 | (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || { 43 | echo 44 | echo "**Error**: You must have \`xml-i18n-toolize' installed." 45 | echo "You can get it from:" 46 | echo " ftp://ftp.gnome.org/pub/GNOME/" 47 | DIE=1 48 | } 49 | } 50 | 51 | (grep "^LT_INIT" $srcdir/configure.ac >/dev/null) && { 52 | (libtool --version) < /dev/null > /dev/null 2>&1 || { 53 | echo 54 | echo "**Error**: You must have \`libtool' installed." 55 | echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" 56 | DIE=1 57 | } 58 | } 59 | 60 | (grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.ac >/dev/null) && { 61 | (grep "sed.*POTFILES" $srcdir/configure.ac) > /dev/null || \ 62 | (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || { 63 | echo 64 | echo "**Error**: You must have \`glib' installed." 65 | echo "You can get it from: ftp://ftp.gtk.org/pub/gtk" 66 | DIE=1 67 | } 68 | } 69 | 70 | (automake --version) < /dev/null > /dev/null 2>&1 || { 71 | echo 72 | echo "**Error**: You must have \`automake' installed." 73 | echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" 74 | DIE=1 75 | NO_AUTOMAKE=yes 76 | } 77 | 78 | 79 | # if no automake, don't bother testing for aclocal 80 | test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { 81 | echo 82 | echo "**Error**: Missing \`aclocal'. The version of \`automake'" 83 | echo "installed doesn't appear recent enough." 84 | echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/" 85 | DIE=1 86 | } 87 | 88 | if test "$DIE" -eq 1; then 89 | exit 1 90 | fi 91 | 92 | if test -z "$*"; then 93 | echo "**Warning**: I am going to run \`configure' with no arguments." 94 | echo "If you wish to pass any to it, please specify them on the" 95 | echo \`$0\'" command line." 96 | echo 97 | fi 98 | 99 | case $CC in 100 | xlc ) 101 | am_opt=--include-deps;; 102 | esac 103 | 104 | for coin in `find $srcdir -path $srcdir/CVS -prune -o -name configure.ac -print` 105 | do 106 | dr=`dirname $coin` 107 | if test -f $dr/NO-AUTO-GEN; then 108 | echo skipping $dr -- flagged as no auto-gen 109 | else 110 | echo processing $dr 111 | ( cd $dr 112 | 113 | aclocalinclude="$ACLOCAL_FLAGS" 114 | 115 | if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then 116 | echo "Creating $dr/aclocal.m4 ..." 117 | test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 118 | echo "Running glib-gettextize... Ignore non-fatal messages." 119 | echo "no" | glib-gettextize --force --copy 120 | echo "Making $dr/aclocal.m4 writable ..." 121 | test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 122 | fi 123 | if grep "^IT_PROG_INTLTOOL" configure.ac >/dev/null; then 124 | echo "Running intltoolize..." 125 | intltoolize --copy --force --automake 126 | fi 127 | if grep "^AM_PROG_XML_I18N_TOOLS" configure.ac >/dev/null; then 128 | echo "Running xml-i18n-toolize..." 129 | xml-i18n-toolize --copy --force --automake 130 | fi 131 | if grep "^LT_INIT" configure.ac >/dev/null; then 132 | if test -z "$NO_LIBTOOLIZE" ; then 133 | echo "Running libtoolize..." 134 | libtoolize --force --copy 135 | fi 136 | fi 137 | echo "Running aclocal $aclocalinclude ..." 138 | aclocal $aclocalinclude 139 | if grep "^A[CM]_CONFIG_HEADER" configure.ac >/dev/null; then 140 | echo "Running autoheader..." 141 | autoheader 142 | fi 143 | echo "Running automake --gnu $am_opt ..." 144 | automake --add-missing --copy --gnu $am_opt 145 | echo "Running autoconf ..." 146 | autoconf 147 | ) 148 | fi 149 | done 150 | 151 | if test x$NOCONFIGURE = x; then 152 | echo Running $srcdir/configure "$@" ... 153 | $srcdir/configure "$@" \ 154 | && echo Now type \`make\' to compile. || exit 1 155 | else 156 | echo Skipping configure process. 157 | fi 158 | -------------------------------------------------------------------------------- /src/http.cc: -------------------------------------------------------------------------------- 1 | // http.cc 2 | // 3 | // Copyright (C) 2016 - Unknown 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; either version 2 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program. If not, see . 17 | 18 | #include 19 | #include 20 | 21 | Json::Value raw_post(std::string,std::string,bool isPost); 22 | Json::Value http_get(std::string, std::map); 23 | Json::Value http_post(std::string, std::map); 24 | 25 | void init_http(){ 26 | /*remove old cookie file*/ 27 | std::string cookie_path = OJ_HOME + std::string("/cookie"); 28 | std::remove(cookie_path.c_str()); 29 | 30 | /*initiate*/ 31 | curl_global_init(CURL_GLOBAL_ALL); 32 | } 33 | 34 | size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp){ 35 | //std::cout<<(char *)buffer<c_str(), ret); 106 | delete ret_str; 107 | 108 | curl_easy_getinfo (curl, CURLINFO_RESPONSE_CODE, &code); 109 | 110 | curl_slist_free_all(chunk); 111 | curl_easy_cleanup(curl); 112 | 113 | switch(code){ 114 | case 500: 115 | case 501: 116 | case 502: 117 | case 503: 118 | sleep(10); 119 | break; 120 | case 401: 121 | sleep(1); 122 | break; 123 | case 302: 124 | case 200: 125 | /*succeed*/ 126 | if(OJ_DEBUG){ 127 | std::cout< par){ 149 | CURL *curl = curl_easy_init(); 150 | url = OJ_URL + url + "?judger_token=" + OJ_TOKEN; 151 | //std::cerr< par){ 176 | CURL *curl = curl_easy_init(); 177 | url = OJ_URL + url + "?judger_token=" + OJ_TOKEN; 178 | //std::cerr< 5 | * 6 | * wzoj-judger is free software: you can redistribute it and/or modify it 7 | * under the terms of the GNU General Public License as published by the 8 | * Free Software Foundation, either version 3 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * wzoj-judger is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | * See the GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License along 17 | * with this program. If not, see . 18 | */ 19 | 20 | char OJ_HOME_DEFAULT[] = "/home/judger"; 21 | 22 | #include 23 | 24 | /** 25 | * json Config 26 | **/ 27 | Json::Value jsonConfigValue; 28 | 29 | /** 30 | * read from configure file 31 | */ 32 | const char *OJ_URL = NULL; 33 | const char *OJ_TOKEN = NULL; 34 | int OJ_MAXRUNNING = 3; 35 | int OJ_SLEEPTIME = 10; 36 | bool OJ_SIMCHECK = false; 37 | 38 | /** 39 | * parameters 40 | */ 41 | int OJ_DEBUG = false; 42 | char *OJ_PROGRAMNAME=NULL; 43 | char *OJ_HOME=NULL; 44 | bool OJ_ONCE = false; 45 | int OJ_SOLUTION_NO = -1; 46 | 47 | static const option longopts[] = 48 | { 49 | { "help", no_argument, NULL, 'h' }, 50 | { "version", no_argument, NULL, 'v' }, 51 | { "debug", no_argument, NULL, 'd' }, 52 | { "cd", required_argument, NULL, 'c'}, 53 | { "once", no_argument, NULL, 'a'}, 54 | { "solution", required_argument, NULL, 's'}, 55 | { NULL, 0, NULL, 0 } 56 | }; 57 | 58 | bool already_running(); 59 | void call_for_exit(int); 60 | void daemon_init(); 61 | void init_config(); 62 | void clean_run_dirs(); 63 | 64 | int main(int argc,char *argv[]) 65 | { 66 | //atexit(close_stdout); 67 | 68 | OJ_PROGRAMNAME = argv[0]; 69 | 70 | int optc; 71 | bool lose = false; 72 | while((optc = getopt_long(argc,argv,"g:hntv",longopts,NULL)) != -1){ 73 | switch(optc){ 74 | case 'v': 75 | print_version(); 76 | exit(EXIT_SUCCESS); 77 | case 'h': 78 | print_help(); 79 | exit(EXIT_SUCCESS); 80 | case 'd': 81 | OJ_DEBUG = true; 82 | break; 83 | case 'c': 84 | OJ_HOME = optarg; 85 | break; 86 | case 'a': 87 | OJ_ONCE = true; 88 | break; 89 | case 's': 90 | sscanf(optarg, "%d", &OJ_SOLUTION_NO); 91 | break; 92 | default: 93 | lose = true; 94 | break; 95 | } 96 | } 97 | 98 | if(lose || optind < argc){ 99 | if(optind < argc){ 100 | fprintf(stderr,"%s: extra operand: %s\n", 101 | OJ_PROGRAMNAME,argv[optind]); 102 | }else{ 103 | fprintf(stderr,"Try `%s --help` for more information.\n", 104 | OJ_PROGRAMNAME); 105 | } 106 | exit(EXIT_FAILURE); 107 | } 108 | 109 | if(OJ_HOME == NULL) OJ_HOME = OJ_HOME_DEFAULT; 110 | 111 | if(OJ_DEBUG){ 112 | printf("running in debug mode!\n"); 113 | } 114 | 115 | if(OJ_DEBUG){ 116 | printf("home:%s\n",OJ_HOME); 117 | } 118 | 119 | if(already_running()){ 120 | printf("A judger on %s is already running!\n", OJ_HOME); 121 | exit(EXIT_FAILURE); 122 | } 123 | 124 | signal(SIGQUIT, call_for_exit); 125 | signal(SIGKILL, call_for_exit); 126 | signal(SIGTERM, call_for_exit); 127 | signal(SIGINT, call_for_exit); 128 | 129 | init_config(); 130 | init_http(); 131 | 132 | clean_run_dirs(); 133 | if(OJ_SIMCHECK){ 134 | sim_daemon(); 135 | } 136 | if(OJ_SOLUTION_NO > 0){ 137 | judge_solution(OJ_SOLUTION_NO, 0); 138 | call_for_exit (0); 139 | } 140 | 141 | if(!OJ_DEBUG){ 142 | daemon_init(); 143 | } 144 | system("/sbin/iptables -A OUTPUT -m owner --uid-owner judger -j DROP"); 145 | 146 | if(OJ_ONCE || OJ_SLEEPTIME){ 147 | bool flag=true; 148 | while(true){ 149 | while(flag){ 150 | flag = daemon_work(); 151 | if(flag && OJ_ONCE){ 152 | goto end; 153 | } 154 | } 155 | if(OJ_DEBUG){ 156 | printf("all tasks finished\n"); 157 | } 158 | sleep(OJ_SLEEPTIME); 159 | flag = true; 160 | } 161 | }else{ 162 | listen_udp(); 163 | } 164 | 165 | end: 166 | call_for_exit (0); 167 | } 168 | 169 | void config_read_str(const char *&cfg,const char *idx){ 170 | char *buffer; 171 | buffer = (char *)malloc(sizeof(char) * 172 | (strlen(jsonConfigValue[idx].asString().c_str())+1)); 173 | strcpy(buffer, jsonConfigValue[idx].asString().c_str()); 174 | cfg = buffer; 175 | } 176 | 177 | void init_config(){ 178 | if(OJ_DEBUG){ 179 | std::cout<<"init configure"<>jsonConfigValue; 192 | 193 | config_read_str(OJ_URL, "url"); 194 | config_read_str(OJ_TOKEN, "token"); 195 | OJ_SLEEPTIME = jsonConfigValue["sleep_time"].asInt(); 196 | OJ_MAXRUNNING = jsonConfigValue["max_running"].asInt(); 197 | OJ_SIMCHECK = jsonConfigValue["sim_check"].asBool(); 198 | 199 | OJ_MAXRUNNING = std::min(OJ_MAXRUNNING , 100); 200 | 201 | if(OJ_DEBUG){ 202 | std::cout<<"OJ_URL:"< 94 | #include //typedef String 95 | #include //typedef int64_t, uint64_t 96 | 97 | /// If defined, indicates that json library is embedded in CppTL library. 98 | //# define JSON_IN_CPPTL 1 99 | 100 | /// If defined, indicates that json may leverage CppTL library 101 | //# define JSON_USE_CPPTL 1 102 | /// If defined, indicates that cpptl vector based map should be used instead of 103 | /// std::map 104 | /// as Value container. 105 | //# define JSON_USE_CPPTL_SMALLMAP 1 106 | 107 | // If non-zero, the library uses exceptions to report bad input instead of C 108 | // assertion macros. The default is to use exceptions. 109 | #ifndef JSON_USE_EXCEPTION 110 | #define JSON_USE_EXCEPTION 1 111 | #endif 112 | 113 | /// If defined, indicates that the source file is amalgated 114 | /// to prevent private header inclusion. 115 | /// Remarks: it is automatically defined in the generated amalgated header. 116 | // #define JSON_IS_AMALGAMATION 117 | 118 | #ifdef JSON_IN_CPPTL 119 | #include 120 | #ifndef JSON_USE_CPPTL 121 | #define JSON_USE_CPPTL 1 122 | #endif 123 | #endif 124 | 125 | #ifdef JSON_IN_CPPTL 126 | #define JSON_API CPPTL_API 127 | #elif defined(JSON_DLL_BUILD) 128 | #if defined(_MSC_VER) || defined(__MINGW32__) 129 | #define JSON_API __declspec(dllexport) 130 | #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING 131 | #endif // if defined(_MSC_VER) 132 | #elif defined(JSON_DLL) 133 | #if defined(_MSC_VER) || defined(__MINGW32__) 134 | #define JSON_API __declspec(dllimport) 135 | #define JSONCPP_DISABLE_DLL_INTERFACE_WARNING 136 | #endif // if defined(_MSC_VER) 137 | #endif // ifdef JSON_IN_CPPTL 138 | #if !defined(JSON_API) 139 | #define JSON_API 140 | #endif 141 | 142 | // If JSON_NO_INT64 is defined, then Json only support C++ "int" type for 143 | // integer 144 | // Storages, and 64 bits integer support is disabled. 145 | // #define JSON_NO_INT64 1 146 | 147 | #if defined(_MSC_VER) // MSVC 148 | # if _MSC_VER <= 1200 // MSVC 6 149 | // Microsoft Visual Studio 6 only support conversion from __int64 to double 150 | // (no conversion from unsigned __int64). 151 | # define JSON_USE_INT64_DOUBLE_CONVERSION 1 152 | // Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255' 153 | // characters in the debug information) 154 | // All projects I've ever seen with VS6 were using this globally (not bothering 155 | // with pragma push/pop). 156 | # pragma warning(disable : 4786) 157 | # endif // MSVC 6 158 | 159 | # if _MSC_VER >= 1500 // MSVC 2008 160 | /// Indicates that the following function is deprecated. 161 | # define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) 162 | # endif 163 | 164 | #endif // defined(_MSC_VER) 165 | 166 | // In c++11 the override keyword allows you to explicity define that a function 167 | // is intended to override the base-class version. This makes the code more 168 | // managable and fixes a set of common hard-to-find bugs. 169 | #if __cplusplus >= 201103L 170 | # define JSONCPP_OVERRIDE override 171 | # define JSONCPP_NOEXCEPT noexcept 172 | #elif defined(_MSC_VER) && _MSC_VER > 1600 && _MSC_VER < 1900 173 | # define JSONCPP_OVERRIDE override 174 | # define JSONCPP_NOEXCEPT throw() 175 | #elif defined(_MSC_VER) && _MSC_VER >= 1900 176 | # define JSONCPP_OVERRIDE override 177 | # define JSONCPP_NOEXCEPT noexcept 178 | #else 179 | # define JSONCPP_OVERRIDE 180 | # define JSONCPP_NOEXCEPT throw() 181 | #endif 182 | 183 | #ifndef JSON_HAS_RVALUE_REFERENCES 184 | 185 | #if defined(_MSC_VER) && _MSC_VER >= 1600 // MSVC >= 2010 186 | #define JSON_HAS_RVALUE_REFERENCES 1 187 | #endif // MSVC >= 2010 188 | 189 | #ifdef __clang__ 190 | #if __has_feature(cxx_rvalue_references) 191 | #define JSON_HAS_RVALUE_REFERENCES 1 192 | #endif // has_feature 193 | 194 | #elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) 195 | #if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) 196 | #define JSON_HAS_RVALUE_REFERENCES 1 197 | #endif // GXX_EXPERIMENTAL 198 | 199 | #endif // __clang__ || __GNUC__ 200 | 201 | #endif // not defined JSON_HAS_RVALUE_REFERENCES 202 | 203 | #ifndef JSON_HAS_RVALUE_REFERENCES 204 | #define JSON_HAS_RVALUE_REFERENCES 0 205 | #endif 206 | 207 | #ifdef __clang__ 208 | #elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc) 209 | # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) 210 | # define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message))) 211 | # elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) 212 | # define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__)) 213 | # endif // GNUC version 214 | #endif // __clang__ || __GNUC__ 215 | 216 | #if !defined(JSONCPP_DEPRECATED) 217 | #define JSONCPP_DEPRECATED(message) 218 | #endif // if !defined(JSONCPP_DEPRECATED) 219 | 220 | #if __GNUC__ >= 6 221 | # define JSON_USE_INT64_DOUBLE_CONVERSION 1 222 | #endif 223 | 224 | #if !defined(JSON_IS_AMALGAMATION) 225 | 226 | # include "version.h" 227 | 228 | # if JSONCPP_USING_SECURE_MEMORY 229 | # include "allocator.h" //typedef Allocator 230 | # endif 231 | 232 | #endif // if !defined(JSON_IS_AMALGAMATION) 233 | 234 | namespace Json { 235 | typedef int Int; 236 | typedef unsigned int UInt; 237 | #if defined(JSON_NO_INT64) 238 | typedef int LargestInt; 239 | typedef unsigned int LargestUInt; 240 | #undef JSON_HAS_INT64 241 | #else // if defined(JSON_NO_INT64) 242 | // For Microsoft Visual use specific types as long long is not supported 243 | #if defined(_MSC_VER) // Microsoft Visual Studio 244 | typedef __int64 Int64; 245 | typedef unsigned __int64 UInt64; 246 | #else // if defined(_MSC_VER) // Other platforms, use long long 247 | typedef int64_t Int64; 248 | typedef uint64_t UInt64; 249 | #endif // if defined(_MSC_VER) 250 | typedef Int64 LargestInt; 251 | typedef UInt64 LargestUInt; 252 | #define JSON_HAS_INT64 253 | #endif // if defined(JSON_NO_INT64) 254 | #if JSONCPP_USING_SECURE_MEMORY 255 | #define JSONCPP_STRING std::basic_string, Json::SecureAllocator > 256 | #define JSONCPP_OSTRINGSTREAM std::basic_ostringstream, Json::SecureAllocator > 257 | #define JSONCPP_OSTREAM std::basic_ostream> 258 | #define JSONCPP_ISTRINGSTREAM std::basic_istringstream, Json::SecureAllocator > 259 | #define JSONCPP_ISTREAM std::istream 260 | #else 261 | #define JSONCPP_STRING std::string 262 | #define JSONCPP_OSTRINGSTREAM std::ostringstream 263 | #define JSONCPP_OSTREAM std::ostream 264 | #define JSONCPP_ISTRINGSTREAM std::istringstream 265 | #define JSONCPP_ISTREAM std::istream 266 | #endif // if JSONCPP_USING_SECURE_MEMORY 267 | } // end namespace Json 268 | 269 | #endif // JSON_CONFIG_H_INCLUDED 270 | 271 | // ////////////////////////////////////////////////////////////////////// 272 | // End of content of file: include/json/config.h 273 | // ////////////////////////////////////////////////////////////////////// 274 | 275 | 276 | 277 | 278 | 279 | 280 | // ////////////////////////////////////////////////////////////////////// 281 | // Beginning of content of file: include/json/forwards.h 282 | // ////////////////////////////////////////////////////////////////////// 283 | 284 | // Copyright 2007-2010 Baptiste Lepilleur 285 | // Distributed under MIT license, or public domain if desired and 286 | // recognized in your jurisdiction. 287 | // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE 288 | 289 | #ifndef JSON_FORWARDS_H_INCLUDED 290 | #define JSON_FORWARDS_H_INCLUDED 291 | 292 | #if !defined(JSON_IS_AMALGAMATION) 293 | #include "config.h" 294 | #endif // if !defined(JSON_IS_AMALGAMATION) 295 | 296 | namespace Json { 297 | 298 | // writer.h 299 | class FastWriter; 300 | class StyledWriter; 301 | 302 | // reader.h 303 | class Reader; 304 | 305 | // features.h 306 | class Features; 307 | 308 | // value.h 309 | typedef unsigned int ArrayIndex; 310 | class StaticString; 311 | class Path; 312 | class PathArgument; 313 | class Value; 314 | class ValueIteratorBase; 315 | class ValueIterator; 316 | class ValueConstIterator; 317 | 318 | } // namespace Json 319 | 320 | #endif // JSON_FORWARDS_H_INCLUDED 321 | 322 | // ////////////////////////////////////////////////////////////////////// 323 | // End of content of file: include/json/forwards.h 324 | // ////////////////////////////////////////////////////////////////////// 325 | 326 | 327 | 328 | 329 | 330 | #endif //ifndef JSON_FORWARD_AMALGATED_H_INCLUDED 331 | -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.15.1 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994-2017 Free Software Foundation, Inc. 5 | 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | @SET_MAKE@ 16 | 17 | VPATH = @srcdir@ 18 | am__is_gnu_make = { \ 19 | if test -z '$(MAKELEVEL)'; then \ 20 | false; \ 21 | elif test -n '$(MAKE_HOST)'; then \ 22 | true; \ 23 | elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ 24 | true; \ 25 | else \ 26 | false; \ 27 | fi; \ 28 | } 29 | am__make_running_with_option = \ 30 | case $${target_option-} in \ 31 | ?) ;; \ 32 | *) echo "am__make_running_with_option: internal error: invalid" \ 33 | "target option '$${target_option-}' specified" >&2; \ 34 | exit 1;; \ 35 | esac; \ 36 | has_opt=no; \ 37 | sane_makeflags=$$MAKEFLAGS; \ 38 | if $(am__is_gnu_make); then \ 39 | sane_makeflags=$$MFLAGS; \ 40 | else \ 41 | case $$MAKEFLAGS in \ 42 | *\\[\ \ ]*) \ 43 | bs=\\; \ 44 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ 45 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ 46 | esac; \ 47 | fi; \ 48 | skip_next=no; \ 49 | strip_trailopt () \ 50 | { \ 51 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ 52 | }; \ 53 | for flg in $$sane_makeflags; do \ 54 | test $$skip_next = yes && { skip_next=no; continue; }; \ 55 | case $$flg in \ 56 | *=*|--*) continue;; \ 57 | -*I) strip_trailopt 'I'; skip_next=yes;; \ 58 | -*I?*) strip_trailopt 'I';; \ 59 | -*O) strip_trailopt 'O'; skip_next=yes;; \ 60 | -*O?*) strip_trailopt 'O';; \ 61 | -*l) strip_trailopt 'l'; skip_next=yes;; \ 62 | -*l?*) strip_trailopt 'l';; \ 63 | -[dEDm]) skip_next=yes;; \ 64 | -[JT]) skip_next=yes;; \ 65 | esac; \ 66 | case $$flg in \ 67 | *$$target_option*) has_opt=yes; break;; \ 68 | esac; \ 69 | done; \ 70 | test $$has_opt = yes 71 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) 72 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 73 | pkgdatadir = $(datadir)/@PACKAGE@ 74 | pkgincludedir = $(includedir)/@PACKAGE@ 75 | pkglibdir = $(libdir)/@PACKAGE@ 76 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 77 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 78 | install_sh_DATA = $(install_sh) -c -m 644 79 | install_sh_PROGRAM = $(install_sh) -c 80 | install_sh_SCRIPT = $(install_sh) -c 81 | INSTALL_HEADER = $(INSTALL_DATA) 82 | transform = $(program_transform_name) 83 | NORMAL_INSTALL = : 84 | PRE_INSTALL = : 85 | POST_INSTALL = : 86 | NORMAL_UNINSTALL = : 87 | PRE_UNINSTALL = : 88 | POST_UNINSTALL = : 89 | build_triplet = @build@ 90 | host_triplet = @host@ 91 | subdir = . 92 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 93 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 94 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 95 | $(ACLOCAL_M4) 96 | DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ 97 | $(am__configure_deps) $(dist_doc_DATA) $(am__DIST_COMMON) 98 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ 99 | configure.lineno config.status.lineno 100 | mkinstalldirs = $(install_sh) -d 101 | CONFIG_HEADER = config.h 102 | CONFIG_CLEAN_FILES = 103 | CONFIG_CLEAN_VPATH_FILES = 104 | AM_V_P = $(am__v_P_@AM_V@) 105 | am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) 106 | am__v_P_0 = false 107 | am__v_P_1 = : 108 | AM_V_GEN = $(am__v_GEN_@AM_V@) 109 | am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) 110 | am__v_GEN_0 = @echo " GEN " $@; 111 | am__v_GEN_1 = 112 | AM_V_at = $(am__v_at_@AM_V@) 113 | am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) 114 | am__v_at_0 = @ 115 | am__v_at_1 = 116 | SOURCES = 117 | DIST_SOURCES = 118 | RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ 119 | ctags-recursive dvi-recursive html-recursive info-recursive \ 120 | install-data-recursive install-dvi-recursive \ 121 | install-exec-recursive install-html-recursive \ 122 | install-info-recursive install-pdf-recursive \ 123 | install-ps-recursive install-recursive installcheck-recursive \ 124 | installdirs-recursive pdf-recursive ps-recursive \ 125 | tags-recursive uninstall-recursive 126 | am__can_run_installinfo = \ 127 | case $$AM_UPDATE_INFO_DIR in \ 128 | n|no|NO) false;; \ 129 | *) (install-info --version) >/dev/null 2>&1;; \ 130 | esac 131 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; 132 | am__vpath_adj = case $$p in \ 133 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ 134 | *) f=$$p;; \ 135 | esac; 136 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; 137 | am__install_max = 40 138 | am__nobase_strip_setup = \ 139 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` 140 | am__nobase_strip = \ 141 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" 142 | am__nobase_list = $(am__nobase_strip_setup); \ 143 | for p in $$list; do echo "$$p $$p"; done | \ 144 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ 145 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ 146 | if (++n[$$2] == $(am__install_max)) \ 147 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ 148 | END { for (dir in files) print dir, files[dir] }' 149 | am__base_list = \ 150 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ 151 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' 152 | am__uninstall_files_from_dir = { \ 153 | test -z "$$files" \ 154 | || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ 155 | || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ 156 | $(am__cd) "$$dir" && rm -f $$files; }; \ 157 | } 158 | am__installdirs = "$(DESTDIR)$(docdir)" 159 | DATA = $(dist_doc_DATA) 160 | RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ 161 | distclean-recursive maintainer-clean-recursive 162 | am__recursive_targets = \ 163 | $(RECURSIVE_TARGETS) \ 164 | $(RECURSIVE_CLEAN_TARGETS) \ 165 | $(am__extra_recursive_targets) 166 | AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ 167 | cscope distdir dist dist-all distcheck 168 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ 169 | $(LISP)config.h.in 170 | # Read a list of newline-separated strings from the standard input, 171 | # and print each of them once, without duplicates. Input order is 172 | # *not* preserved. 173 | am__uniquify_input = $(AWK) '\ 174 | BEGIN { nonempty = 0; } \ 175 | { items[$$0] = 1; nonempty = 1; } \ 176 | END { if (nonempty) { for (i in items) print i; }; } \ 177 | ' 178 | # Make sure the list of sources is unique. This is necessary because, 179 | # e.g., the same source file might be shared among _SOURCES variables 180 | # for different programs/libraries. 181 | am__define_uniq_tagged_files = \ 182 | list='$(am__tagged_files)'; \ 183 | unique=`for i in $$list; do \ 184 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 185 | done | $(am__uniquify_input)` 186 | ETAGS = etags 187 | CTAGS = ctags 188 | CSCOPE = cscope 189 | DIST_SUBDIRS = $(SUBDIRS) 190 | am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \ 191 | COPYING ChangeLog INSTALL NEWS README compile config.guess \ 192 | config.sub install-sh ltmain.sh missing 193 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 194 | distdir = $(PACKAGE)-$(VERSION) 195 | top_distdir = $(distdir) 196 | am__remove_distdir = \ 197 | if test -d "$(distdir)"; then \ 198 | find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ 199 | && rm -rf "$(distdir)" \ 200 | || { sleep 5 && rm -rf "$(distdir)"; }; \ 201 | else :; fi 202 | am__post_remove_distdir = $(am__remove_distdir) 203 | am__relativize = \ 204 | dir0=`pwd`; \ 205 | sed_first='s,^\([^/]*\)/.*$$,\1,'; \ 206 | sed_rest='s,^[^/]*/*,,'; \ 207 | sed_last='s,^.*/\([^/]*\)$$,\1,'; \ 208 | sed_butlast='s,/*[^/]*$$,,'; \ 209 | while test -n "$$dir1"; do \ 210 | first=`echo "$$dir1" | sed -e "$$sed_first"`; \ 211 | if test "$$first" != "."; then \ 212 | if test "$$first" = ".."; then \ 213 | dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ 214 | dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ 215 | else \ 216 | first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ 217 | if test "$$first2" = "$$first"; then \ 218 | dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ 219 | else \ 220 | dir2="../$$dir2"; \ 221 | fi; \ 222 | dir0="$$dir0"/"$$first"; \ 223 | fi; \ 224 | fi; \ 225 | dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ 226 | done; \ 227 | reldir="$$dir2" 228 | DIST_ARCHIVES = $(distdir).tar.gz 229 | GZIP_ENV = --best 230 | DIST_TARGETS = dist-gzip 231 | distuninstallcheck_listfiles = find . -type f -print 232 | am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ 233 | | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' 234 | distcleancheck_listfiles = find . -type f -print 235 | ACLOCAL = @ACLOCAL@ 236 | ALL_LINGUAS = @ALL_LINGUAS@ 237 | AMTAR = @AMTAR@ 238 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 239 | AR = @AR@ 240 | AUTOCONF = @AUTOCONF@ 241 | AUTOHEADER = @AUTOHEADER@ 242 | AUTOMAKE = @AUTOMAKE@ 243 | AWK = @AWK@ 244 | CATALOGS = @CATALOGS@ 245 | CATOBJEXT = @CATOBJEXT@ 246 | CC = @CC@ 247 | CCDEPMODE = @CCDEPMODE@ 248 | CFLAGS = @CFLAGS@ 249 | CPP = @CPP@ 250 | CPPFLAGS = @CPPFLAGS@ 251 | CXX = @CXX@ 252 | CXXCPP = @CXXCPP@ 253 | CXXDEPMODE = @CXXDEPMODE@ 254 | CXXFLAGS = @CXXFLAGS@ 255 | CYGPATH_W = @CYGPATH_W@ 256 | DATADIRNAME = @DATADIRNAME@ 257 | DEFS = @DEFS@ 258 | DEPDIR = @DEPDIR@ 259 | DLLTOOL = @DLLTOOL@ 260 | DSYMUTIL = @DSYMUTIL@ 261 | DUMPBIN = @DUMPBIN@ 262 | ECHO_C = @ECHO_C@ 263 | ECHO_N = @ECHO_N@ 264 | ECHO_T = @ECHO_T@ 265 | EGREP = @EGREP@ 266 | EXEEXT = @EXEEXT@ 267 | FGREP = @FGREP@ 268 | GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ 269 | GMOFILES = @GMOFILES@ 270 | GMSGFMT = @GMSGFMT@ 271 | GREP = @GREP@ 272 | INSTALL = @INSTALL@ 273 | INSTALL_DATA = @INSTALL_DATA@ 274 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 275 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 276 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 277 | INSTOBJEXT = @INSTOBJEXT@ 278 | INTLLIBS = @INTLLIBS@ 279 | INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ 280 | INTLTOOL_MERGE = @INTLTOOL_MERGE@ 281 | INTLTOOL_PERL = @INTLTOOL_PERL@ 282 | INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ 283 | INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ 284 | INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ 285 | INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ 286 | INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ 287 | INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ 288 | LD = @LD@ 289 | LDFLAGS = @LDFLAGS@ 290 | LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ 291 | LIBCURL_LIBS = @LIBCURL_LIBS@ 292 | LIBOBJS = @LIBOBJS@ 293 | LIBS = @LIBS@ 294 | LIBTOOL = @LIBTOOL@ 295 | LIPO = @LIPO@ 296 | LN_S = @LN_S@ 297 | LTLIBOBJS = @LTLIBOBJS@ 298 | LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ 299 | MAKEINFO = @MAKEINFO@ 300 | MANIFEST_TOOL = @MANIFEST_TOOL@ 301 | MKDIR_P = @MKDIR_P@ 302 | MKINSTALLDIRS = @MKINSTALLDIRS@ 303 | MSGFMT = @MSGFMT@ 304 | MSGFMT_OPTS = @MSGFMT_OPTS@ 305 | MSGMERGE = @MSGMERGE@ 306 | NM = @NM@ 307 | NMEDIT = @NMEDIT@ 308 | OBJDUMP = @OBJDUMP@ 309 | OBJEXT = @OBJEXT@ 310 | OTOOL = @OTOOL@ 311 | OTOOL64 = @OTOOL64@ 312 | PACKAGE = @PACKAGE@ 313 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 314 | PACKAGE_NAME = @PACKAGE_NAME@ 315 | PACKAGE_STRING = @PACKAGE_STRING@ 316 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 317 | PACKAGE_URL = @PACKAGE_URL@ 318 | PACKAGE_VERSION = @PACKAGE_VERSION@ 319 | PATH_SEPARATOR = @PATH_SEPARATOR@ 320 | PKG_CONFIG = @PKG_CONFIG@ 321 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ 322 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ 323 | POFILES = @POFILES@ 324 | POSUB = @POSUB@ 325 | PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ 326 | PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ 327 | RANLIB = @RANLIB@ 328 | SED = @SED@ 329 | SET_MAKE = @SET_MAKE@ 330 | SHELL = @SHELL@ 331 | STRIP = @STRIP@ 332 | USE_NLS = @USE_NLS@ 333 | VERSION = @VERSION@ 334 | XGETTEXT = @XGETTEXT@ 335 | abs_builddir = @abs_builddir@ 336 | abs_srcdir = @abs_srcdir@ 337 | abs_top_builddir = @abs_top_builddir@ 338 | abs_top_srcdir = @abs_top_srcdir@ 339 | ac_ct_AR = @ac_ct_AR@ 340 | ac_ct_CC = @ac_ct_CC@ 341 | ac_ct_CXX = @ac_ct_CXX@ 342 | ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 343 | am__include = @am__include@ 344 | am__leading_dot = @am__leading_dot@ 345 | am__quote = @am__quote@ 346 | am__tar = @am__tar@ 347 | am__untar = @am__untar@ 348 | bindir = @bindir@ 349 | build = @build@ 350 | build_alias = @build_alias@ 351 | build_cpu = @build_cpu@ 352 | build_os = @build_os@ 353 | build_vendor = @build_vendor@ 354 | builddir = @builddir@ 355 | datadir = @datadir@ 356 | datarootdir = @datarootdir@ 357 | docdir = @docdir@ 358 | dvidir = @dvidir@ 359 | exec_prefix = @exec_prefix@ 360 | host = @host@ 361 | host_alias = @host_alias@ 362 | host_cpu = @host_cpu@ 363 | host_os = @host_os@ 364 | host_vendor = @host_vendor@ 365 | htmldir = @htmldir@ 366 | includedir = @includedir@ 367 | infodir = @infodir@ 368 | install_sh = @install_sh@ 369 | intltool__v_merge_options_ = @intltool__v_merge_options_@ 370 | intltool__v_merge_options_0 = @intltool__v_merge_options_0@ 371 | libdir = @libdir@ 372 | libexecdir = @libexecdir@ 373 | localedir = @localedir@ 374 | localstatedir = @localstatedir@ 375 | mandir = @mandir@ 376 | mkdir_p = @mkdir_p@ 377 | oldincludedir = @oldincludedir@ 378 | pdfdir = @pdfdir@ 379 | prefix = @prefix@ 380 | program_transform_name = @program_transform_name@ 381 | psdir = @psdir@ 382 | sbindir = @sbindir@ 383 | sharedstatedir = @sharedstatedir@ 384 | srcdir = @srcdir@ 385 | sysconfdir = @sysconfdir@ 386 | target_alias = @target_alias@ 387 | top_build_prefix = @top_build_prefix@ 388 | top_builddir = @top_builddir@ 389 | top_srcdir = @top_srcdir@ 390 | SUBDIRS = src po 391 | dist_doc_DATA = \ 392 | README \ 393 | COPYING \ 394 | AUTHORS \ 395 | ChangeLog \ 396 | INSTALL \ 397 | NEWS 398 | 399 | INTLTOOL_FILES = intltool-extract.in \ 400 | intltool-merge.in \ 401 | intltool-update.in 402 | 403 | EXTRA_DIST = \ 404 | $(INTLTOOL_FILES) 405 | 406 | DISTCLEANFILES = intltool-extract \ 407 | intltool-merge \ 408 | intltool-update \ 409 | po/.intltool-merge-cache 410 | 411 | all: config.h 412 | $(MAKE) $(AM_MAKEFLAGS) all-recursive 413 | 414 | .SUFFIXES: 415 | am--refresh: Makefile 416 | @: 417 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 418 | @for dep in $?; do \ 419 | case '$(am__configure_deps)' in \ 420 | *$$dep*) \ 421 | echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ 422 | $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ 423 | && exit 0; \ 424 | exit 1;; \ 425 | esac; \ 426 | done; \ 427 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ 428 | $(am__cd) $(top_srcdir) && \ 429 | $(AUTOMAKE) --gnu Makefile 430 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 431 | @case '$?' in \ 432 | *config.status*) \ 433 | echo ' $(SHELL) ./config.status'; \ 434 | $(SHELL) ./config.status;; \ 435 | *) \ 436 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ 437 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ 438 | esac; 439 | 440 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 441 | $(SHELL) ./config.status --recheck 442 | 443 | $(top_srcdir)/configure: $(am__configure_deps) 444 | $(am__cd) $(srcdir) && $(AUTOCONF) 445 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 446 | $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) 447 | $(am__aclocal_m4_deps): 448 | 449 | config.h: stamp-h1 450 | @test -f $@ || rm -f stamp-h1 451 | @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 452 | 453 | stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status 454 | @rm -f stamp-h1 455 | cd $(top_builddir) && $(SHELL) ./config.status config.h 456 | $(srcdir)/config.h.in: $(am__configure_deps) 457 | ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) 458 | rm -f stamp-h1 459 | touch $@ 460 | 461 | distclean-hdr: 462 | -rm -f config.h stamp-h1 463 | 464 | mostlyclean-libtool: 465 | -rm -f *.lo 466 | 467 | clean-libtool: 468 | -rm -rf .libs _libs 469 | 470 | distclean-libtool: 471 | -rm -f libtool config.lt 472 | install-dist_docDATA: $(dist_doc_DATA) 473 | @$(NORMAL_INSTALL) 474 | @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ 475 | if test -n "$$list"; then \ 476 | echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ 477 | $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ 478 | fi; \ 479 | for p in $$list; do \ 480 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ 481 | echo "$$d$$p"; \ 482 | done | $(am__base_list) | \ 483 | while read files; do \ 484 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ 485 | $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ 486 | done 487 | 488 | uninstall-dist_docDATA: 489 | @$(NORMAL_UNINSTALL) 490 | @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \ 491 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ 492 | dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) 493 | 494 | # This directory's subdirectories are mostly independent; you can cd 495 | # into them and run 'make' without going through this Makefile. 496 | # To change the values of 'make' variables: instead of editing Makefiles, 497 | # (1) if the variable is set in 'config.status', edit 'config.status' 498 | # (which will cause the Makefiles to be regenerated when you run 'make'); 499 | # (2) otherwise, pass the desired values on the 'make' command line. 500 | $(am__recursive_targets): 501 | @fail=; \ 502 | if $(am__make_keepgoing); then \ 503 | failcom='fail=yes'; \ 504 | else \ 505 | failcom='exit 1'; \ 506 | fi; \ 507 | dot_seen=no; \ 508 | target=`echo $@ | sed s/-recursive//`; \ 509 | case "$@" in \ 510 | distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ 511 | *) list='$(SUBDIRS)' ;; \ 512 | esac; \ 513 | for subdir in $$list; do \ 514 | echo "Making $$target in $$subdir"; \ 515 | if test "$$subdir" = "."; then \ 516 | dot_seen=yes; \ 517 | local_target="$$target-am"; \ 518 | else \ 519 | local_target="$$target"; \ 520 | fi; \ 521 | ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ 522 | || eval $$failcom; \ 523 | done; \ 524 | if test "$$dot_seen" = "no"; then \ 525 | $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ 526 | fi; test -z "$$fail" 527 | 528 | ID: $(am__tagged_files) 529 | $(am__define_uniq_tagged_files); mkid -fID $$unique 530 | tags: tags-recursive 531 | TAGS: tags 532 | 533 | tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 534 | set x; \ 535 | here=`pwd`; \ 536 | if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ 537 | include_option=--etags-include; \ 538 | empty_fix=.; \ 539 | else \ 540 | include_option=--include; \ 541 | empty_fix=; \ 542 | fi; \ 543 | list='$(SUBDIRS)'; for subdir in $$list; do \ 544 | if test "$$subdir" = .; then :; else \ 545 | test ! -f $$subdir/TAGS || \ 546 | set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ 547 | fi; \ 548 | done; \ 549 | $(am__define_uniq_tagged_files); \ 550 | shift; \ 551 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ 552 | test -n "$$unique" || unique=$$empty_fix; \ 553 | if test $$# -gt 0; then \ 554 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 555 | "$$@" $$unique; \ 556 | else \ 557 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 558 | $$unique; \ 559 | fi; \ 560 | fi 561 | ctags: ctags-recursive 562 | 563 | CTAGS: ctags 564 | ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 565 | $(am__define_uniq_tagged_files); \ 566 | test -z "$(CTAGS_ARGS)$$unique" \ 567 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ 568 | $$unique 569 | 570 | GTAGS: 571 | here=`$(am__cd) $(top_builddir) && pwd` \ 572 | && $(am__cd) $(top_srcdir) \ 573 | && gtags -i $(GTAGS_ARGS) "$$here" 574 | cscope: cscope.files 575 | test ! -s cscope.files \ 576 | || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) 577 | clean-cscope: 578 | -rm -f cscope.files 579 | cscope.files: clean-cscope cscopelist 580 | cscopelist: cscopelist-recursive 581 | 582 | cscopelist-am: $(am__tagged_files) 583 | list='$(am__tagged_files)'; \ 584 | case "$(srcdir)" in \ 585 | [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ 586 | *) sdir=$(subdir)/$(srcdir) ;; \ 587 | esac; \ 588 | for i in $$list; do \ 589 | if test -f "$$i"; then \ 590 | echo "$(subdir)/$$i"; \ 591 | else \ 592 | echo "$$sdir/$$i"; \ 593 | fi; \ 594 | done >> $(top_builddir)/cscope.files 595 | 596 | distclean-tags: 597 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 598 | -rm -f cscope.out cscope.in.out cscope.po.out cscope.files 599 | 600 | distdir: $(DISTFILES) 601 | $(am__remove_distdir) 602 | test -d "$(distdir)" || mkdir "$(distdir)" 603 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 604 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 605 | list='$(DISTFILES)'; \ 606 | dist_files=`for file in $$list; do echo $$file; done | \ 607 | sed -e "s|^$$srcdirstrip/||;t" \ 608 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 609 | case $$dist_files in \ 610 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 611 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 612 | sort -u` ;; \ 613 | esac; \ 614 | for file in $$dist_files; do \ 615 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 616 | if test -d $$d/$$file; then \ 617 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 618 | if test -d "$(distdir)/$$file"; then \ 619 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 620 | fi; \ 621 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 622 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 623 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 624 | fi; \ 625 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 626 | else \ 627 | test -f "$(distdir)/$$file" \ 628 | || cp -p $$d/$$file "$(distdir)/$$file" \ 629 | || exit 1; \ 630 | fi; \ 631 | done 632 | @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ 633 | if test "$$subdir" = .; then :; else \ 634 | $(am__make_dryrun) \ 635 | || test -d "$(distdir)/$$subdir" \ 636 | || $(MKDIR_P) "$(distdir)/$$subdir" \ 637 | || exit 1; \ 638 | dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ 639 | $(am__relativize); \ 640 | new_distdir=$$reldir; \ 641 | dir1=$$subdir; dir2="$(top_distdir)"; \ 642 | $(am__relativize); \ 643 | new_top_distdir=$$reldir; \ 644 | echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ 645 | echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ 646 | ($(am__cd) $$subdir && \ 647 | $(MAKE) $(AM_MAKEFLAGS) \ 648 | top_distdir="$$new_top_distdir" \ 649 | distdir="$$new_distdir" \ 650 | am__remove_distdir=: \ 651 | am__skip_length_check=: \ 652 | am__skip_mode_fix=: \ 653 | distdir) \ 654 | || exit 1; \ 655 | fi; \ 656 | done 657 | -test -n "$(am__skip_mode_fix)" \ 658 | || find "$(distdir)" -type d ! -perm -755 \ 659 | -exec chmod u+rwx,go+rx {} \; -o \ 660 | ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ 661 | ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ 662 | ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ 663 | || chmod -R a+r "$(distdir)" 664 | dist-gzip: distdir 665 | tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz 666 | $(am__post_remove_distdir) 667 | 668 | dist-bzip2: distdir 669 | tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 670 | $(am__post_remove_distdir) 671 | 672 | dist-lzip: distdir 673 | tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz 674 | $(am__post_remove_distdir) 675 | 676 | dist-xz: distdir 677 | tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz 678 | $(am__post_remove_distdir) 679 | 680 | dist-tarZ: distdir 681 | @echo WARNING: "Support for distribution archives compressed with" \ 682 | "legacy program 'compress' is deprecated." >&2 683 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 684 | tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z 685 | $(am__post_remove_distdir) 686 | 687 | dist-shar: distdir 688 | @echo WARNING: "Support for shar distribution archives is" \ 689 | "deprecated." >&2 690 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 691 | shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz 692 | $(am__post_remove_distdir) 693 | 694 | dist-zip: distdir 695 | -rm -f $(distdir).zip 696 | zip -rq $(distdir).zip $(distdir) 697 | $(am__post_remove_distdir) 698 | 699 | dist dist-all: 700 | $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' 701 | $(am__post_remove_distdir) 702 | 703 | # This target untars the dist file and tries a VPATH configuration. Then 704 | # it guarantees that the distribution is self-contained by making another 705 | # tarfile. 706 | distcheck: dist 707 | case '$(DIST_ARCHIVES)' in \ 708 | *.tar.gz*) \ 709 | eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ 710 | *.tar.bz2*) \ 711 | bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ 712 | *.tar.lz*) \ 713 | lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ 714 | *.tar.xz*) \ 715 | xz -dc $(distdir).tar.xz | $(am__untar) ;;\ 716 | *.tar.Z*) \ 717 | uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ 718 | *.shar.gz*) \ 719 | eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ 720 | *.zip*) \ 721 | unzip $(distdir).zip ;;\ 722 | esac 723 | chmod -R a-w $(distdir) 724 | chmod u+w $(distdir) 725 | mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst 726 | chmod a-w $(distdir) 727 | test -d $(distdir)/_build || exit 0; \ 728 | dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ 729 | && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ 730 | && am__cwd=`pwd` \ 731 | && $(am__cd) $(distdir)/_build/sub \ 732 | && ../../configure \ 733 | $(AM_DISTCHECK_CONFIGURE_FLAGS) \ 734 | $(DISTCHECK_CONFIGURE_FLAGS) \ 735 | --srcdir=../.. --prefix="$$dc_install_base" \ 736 | && $(MAKE) $(AM_MAKEFLAGS) \ 737 | && $(MAKE) $(AM_MAKEFLAGS) dvi \ 738 | && $(MAKE) $(AM_MAKEFLAGS) check \ 739 | && $(MAKE) $(AM_MAKEFLAGS) install \ 740 | && $(MAKE) $(AM_MAKEFLAGS) installcheck \ 741 | && $(MAKE) $(AM_MAKEFLAGS) uninstall \ 742 | && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ 743 | distuninstallcheck \ 744 | && chmod -R a-w "$$dc_install_base" \ 745 | && ({ \ 746 | (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ 747 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ 748 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ 749 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ 750 | distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ 751 | } || { rm -rf "$$dc_destdir"; exit 1; }) \ 752 | && rm -rf "$$dc_destdir" \ 753 | && $(MAKE) $(AM_MAKEFLAGS) dist \ 754 | && rm -rf $(DIST_ARCHIVES) \ 755 | && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ 756 | && cd "$$am__cwd" \ 757 | || exit 1 758 | $(am__post_remove_distdir) 759 | @(echo "$(distdir) archives ready for distribution: "; \ 760 | list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ 761 | sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' 762 | distuninstallcheck: 763 | @test -n '$(distuninstallcheck_dir)' || { \ 764 | echo 'ERROR: trying to run $@ with an empty' \ 765 | '$$(distuninstallcheck_dir)' >&2; \ 766 | exit 1; \ 767 | }; \ 768 | $(am__cd) '$(distuninstallcheck_dir)' || { \ 769 | echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ 770 | exit 1; \ 771 | }; \ 772 | test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ 773 | || { echo "ERROR: files left after uninstall:" ; \ 774 | if test -n "$(DESTDIR)"; then \ 775 | echo " (check DESTDIR support)"; \ 776 | fi ; \ 777 | $(distuninstallcheck_listfiles) ; \ 778 | exit 1; } >&2 779 | distcleancheck: distclean 780 | @if test '$(srcdir)' = . ; then \ 781 | echo "ERROR: distcleancheck can only run from a VPATH build" ; \ 782 | exit 1 ; \ 783 | fi 784 | @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ 785 | || { echo "ERROR: files left in build directory after distclean:" ; \ 786 | $(distcleancheck_listfiles) ; \ 787 | exit 1; } >&2 788 | check-am: all-am 789 | check: check-recursive 790 | all-am: Makefile $(DATA) config.h 791 | installdirs: installdirs-recursive 792 | installdirs-am: 793 | for dir in "$(DESTDIR)$(docdir)"; do \ 794 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 795 | done 796 | install: install-recursive 797 | install-exec: install-exec-recursive 798 | install-data: install-data-recursive 799 | uninstall: uninstall-recursive 800 | 801 | install-am: all-am 802 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 803 | 804 | installcheck: installcheck-recursive 805 | install-strip: 806 | if test -z '$(STRIP)'; then \ 807 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 808 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 809 | install; \ 810 | else \ 811 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 812 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 813 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ 814 | fi 815 | mostlyclean-generic: 816 | 817 | clean-generic: 818 | 819 | distclean-generic: 820 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 821 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 822 | -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) 823 | 824 | maintainer-clean-generic: 825 | @echo "This command is intended for maintainers to use" 826 | @echo "it deletes files that may require special tools to rebuild." 827 | clean: clean-recursive 828 | 829 | clean-am: clean-generic clean-libtool mostlyclean-am 830 | 831 | distclean: distclean-recursive 832 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) 833 | -rm -f Makefile 834 | distclean-am: clean-am distclean-generic distclean-hdr \ 835 | distclean-libtool distclean-tags 836 | 837 | dvi: dvi-recursive 838 | 839 | dvi-am: 840 | 841 | html: html-recursive 842 | 843 | html-am: 844 | 845 | info: info-recursive 846 | 847 | info-am: 848 | 849 | install-data-am: install-dist_docDATA 850 | 851 | install-dvi: install-dvi-recursive 852 | 853 | install-dvi-am: 854 | 855 | install-exec-am: 856 | 857 | install-html: install-html-recursive 858 | 859 | install-html-am: 860 | 861 | install-info: install-info-recursive 862 | 863 | install-info-am: 864 | 865 | install-man: 866 | 867 | install-pdf: install-pdf-recursive 868 | 869 | install-pdf-am: 870 | 871 | install-ps: install-ps-recursive 872 | 873 | install-ps-am: 874 | 875 | installcheck-am: 876 | 877 | maintainer-clean: maintainer-clean-recursive 878 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) 879 | -rm -rf $(top_srcdir)/autom4te.cache 880 | -rm -f Makefile 881 | maintainer-clean-am: distclean-am maintainer-clean-generic 882 | 883 | mostlyclean: mostlyclean-recursive 884 | 885 | mostlyclean-am: mostlyclean-generic mostlyclean-libtool 886 | 887 | pdf: pdf-recursive 888 | 889 | pdf-am: 890 | 891 | ps: ps-recursive 892 | 893 | ps-am: 894 | 895 | uninstall-am: uninstall-dist_docDATA uninstall-local 896 | 897 | .MAKE: $(am__recursive_targets) all install-am install-strip 898 | 899 | .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ 900 | am--refresh check check-am clean clean-cscope clean-generic \ 901 | clean-libtool cscope cscopelist-am ctags ctags-am dist \ 902 | dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ 903 | dist-xz dist-zip distcheck distclean distclean-generic \ 904 | distclean-hdr distclean-libtool distclean-tags distcleancheck \ 905 | distdir distuninstallcheck dvi dvi-am html html-am info \ 906 | info-am install install-am install-data install-data-am \ 907 | install-dist_docDATA install-dvi install-dvi-am install-exec \ 908 | install-exec-am install-html install-html-am install-info \ 909 | install-info-am install-man install-pdf install-pdf-am \ 910 | install-ps install-ps-am install-strip installcheck \ 911 | installcheck-am installdirs installdirs-am maintainer-clean \ 912 | maintainer-clean-generic mostlyclean mostlyclean-generic \ 913 | mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ 914 | uninstall-am uninstall-dist_docDATA uninstall-local 915 | 916 | .PRECIOUS: Makefile 917 | 918 | 919 | # Remove doc directory on uninstall 920 | uninstall-local: 921 | -rm -r $(docdir) 922 | 923 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 924 | # Otherwise a system limit (for SysV at least) may be exceeded. 925 | .NOEXPORT: 926 | -------------------------------------------------------------------------------- /src/judger.cc: -------------------------------------------------------------------------------- 1 | // judger.cc 2 | // 3 | // Copyright (C) 2016 - Unknown 4 | // 5 | // This program is free software; you can redistribute it and/or modify 6 | // it under the terms of the GNU General Public License as published by 7 | // the Free Software Foundation; either version 2 of the License, or 8 | // (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // You should have received a copy of the GNU General Public License 16 | // along with this program. If not, see . 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #define STD_MB 1048576 29 | #define STD_F_LIM (STD_MB<<5) 30 | #define BUFFER_SIZE 5120 31 | 32 | #ifdef __i386 33 | #include 34 | #define REG_SYSCALL orig_eax 35 | #define REG_RET eax 36 | #define REG_ARG0 ebx 37 | #define REG_ARG1 ecx 38 | #else 39 | #include 40 | #define REG_SYSCALL orig_rax 41 | #define REG_RET rax 42 | #define REG_ARG0 rdi 43 | #define REG_ARG1 rsi 44 | #endif 45 | 46 | int execute_cmd(const char * fmt, ...) { 47 | char cmd[BUFFER_SIZE]; 48 | 49 | int ret = 0; 50 | va_list ap; 51 | 52 | va_start(ap, fmt); 53 | vsprintf(cmd, fmt, ap); 54 | ret = system(cmd); 55 | va_end(ap); 56 | return ret; 57 | } 58 | 59 | std::string readFile(const std::string &fileName) 60 | { 61 | std::ifstream ifs(fileName.c_str(), 62 | std::ios::in | std::ios::binary | std::ios::ate); 63 | 64 | std::ifstream::pos_type fileSize = ifs.tellg(); 65 | ifs.seekg(0, std::ios::beg); 66 | 67 | std::vector bytes(fileSize); 68 | ifs.read(&bytes[0], fileSize); 69 | 70 | return std::string(&bytes[0], fileSize); 71 | } 72 | 73 | int isInFile(const char fname[]) { 74 | int l = strlen(fname); 75 | if (l <= 3 || strcmp(fname + l - 3, ".in") != 0) 76 | return 0; 77 | else 78 | return l - 3; 79 | } 80 | 81 | long get_file_size(const char * filename) { 82 | struct stat f_stat; 83 | 84 | if (stat(filename, &f_stat) == -1) { 85 | return 0; 86 | } 87 | 88 | return (long) f_stat.st_size; 89 | } 90 | 91 | void print_runtimeerror(char * err) { 92 | FILE *ferr = fopen("./error.out", "a+"); 93 | fprintf(ferr, "Runtime Error:%s\n", err); 94 | fclose(ferr); 95 | } 96 | 97 | int compare_files(const char *file1, const char *file2, 98 | std::string &verdict){ 99 | int ret = OJ_AC , pe_space = 0 , pe_n = 0; 100 | FILE * f1, *f2; 101 | char c1,c2; 102 | f1 = fopen(file1, "re"); 103 | f2 = fopen(file2, "re"); 104 | if (!f1 || !f2){ 105 | ret = OJ_RE; 106 | goto wzoj_end; 107 | } 108 | c1 = fgetc(f1); 109 | c2 = fgetc(f2); 110 | 111 | while(true){ 112 | if(c1 == EOF){ 113 | while(c2 != EOF){ 114 | if(!isspace(c2)){ 115 | ret = OJ_WA; 116 | goto wzoj_end; 117 | } 118 | c2 = fgetc(f2); 119 | } 120 | goto wzoj_end; 121 | } 122 | if(c2 == EOF){ 123 | while(c1 != EOF){ 124 | if(!isspace(c1)){ 125 | ret = OJ_WA; 126 | goto wzoj_end; 127 | } 128 | c1 = fgetc(f1); 129 | } 130 | goto wzoj_end; 131 | } 132 | 133 | if(c1 == '\r' && c2 == '\r'){ 134 | }else if(c1 == '\r' && c2 == '\n'){ 135 | c1 = fgetc(f1); 136 | if(c1 != '\n'){ 137 | pe_space = 1; 138 | } 139 | continue; 140 | }else if(c1 == '\r' && isspace(c2)){ 141 | pe_space = 1; 142 | }else if(c1 == '\r'){ 143 | pe_space = 1; 144 | c1 = fgetc(f1); 145 | continue; 146 | }else if(c1 == '\n' && c2 == '\r'){ 147 | c2 = fgetc(f2); 148 | if(c2 != '\n'){ 149 | pe_space = 1; 150 | } 151 | continue; 152 | }else if(c1 == '\n' && c2 == '\n'){ 153 | pe_space = 0; 154 | }else if(c1 == '\n' && isspace(c2)){ 155 | pe_space = 1; 156 | c2 = fgetc(f2); 157 | continue; 158 | }else if(c1 == '\n'){ 159 | pe_n = 1; 160 | c1 = fgetc(f1); 161 | continue; 162 | }else if(isspace(c1) && c2 == '\r'){ 163 | pe_space=1; 164 | }else if(isspace(c1) && c2 == '\n'){ 165 | pe_space = 1; 166 | c1 = fgetc(f1); 167 | continue; 168 | }else if(isspace(c1) && isspace(c2)){ 169 | if(c1 != c2) pe_space=1; 170 | }else if(isspace(c1)){ 171 | pe_space = 1; 172 | c1 = fgetc(f1); 173 | continue; 174 | }else if(c2 == '\r'){ 175 | pe_space = 1; 176 | c2 = fgetc(f2); 177 | continue; 178 | }else if(c2 == '\n'){ 179 | pe_n = 1; 180 | c2 = fgetc(f2); 181 | continue; 182 | }else if(isspace(c2)){ 183 | pe_space = 1; 184 | c2 = fgetc(f2); 185 | continue; 186 | }else{ 187 | if(pe_space || pe_n){ 188 | ret = OJ_PE; 189 | } 190 | if(c1 != c2){ 191 | ret = OJ_WA; 192 | goto wzoj_end; 193 | } 194 | } 195 | c1 = fgetc(f1); 196 | c2 = fgetc(f2); 197 | } 198 | 199 | wzoj_end: 200 | if(f1) fclose(f1); 201 | if(f2) fclose(f2); 202 | /* 203 | if (ret == OJ_WA || ret==OJ_PE){ 204 | if(full_diff) 205 | make_diff_out_full(f1, f2, c1, c2, file1); 206 | else 207 | make_diff_out_simple(f1, f2, c1, c2, file1); 208 | }*/ 209 | switch(ret){ 210 | case OJ_AC: 211 | verdict = "AC"; 212 | break; 213 | case OJ_WA: 214 | verdict = "WA"; 215 | break; 216 | case OJ_PE: 217 | verdict = "PE"; 218 | break; 219 | } 220 | return ret; 221 | } 222 | 223 | int get_proc_status(int pid, const char * mark) { 224 | FILE * pf; 225 | char fn[BUFFER_SIZE], buf[BUFFER_SIZE]; 226 | int ret = 0; 227 | sprintf(fn, "/proc/%d/status", pid); 228 | pf = fopen(fn, "re"); 229 | int m = strlen(mark); 230 | while (pf && fgets(buf, BUFFER_SIZE - 1, pf)) { 231 | 232 | buf[strlen(buf) - 1] = 0; 233 | if (strncmp(buf, mark, m) == 0) { 234 | sscanf(buf + m + 1, "%d", &ret); 235 | } 236 | } 237 | if (pf) 238 | fclose(pf); 239 | return ret; 240 | } 241 | 242 | 243 | const int CALL_ARRAY_SIZE = 512; 244 | bool ALLOWED_CALLS[CALL_ARRAY_SIZE]; 245 | void init_syscalls_limits(int lang){ 246 | if(OJ_DEBUG){ 247 | std::cout<<"init syscalls for "< par; 290 | par["solution_id"]=std::to_string(sid); 291 | if(sid == OJ_SOLUTION_NO && OJ_DEBUG){ 292 | par["force"] = "true"; 293 | } 294 | Json::Value val = http_post("/judger/checkout", par); 295 | //std::cout</dev/null"); 336 | //execute_cmd("mount --bind /lib64 lib64 &>/dev/null"); 337 | //execute_cmd("mount --bind /usr usr &>/dev/null"); 338 | //execute_cmd("mount --bind /etc/alternatives etc/alternatives &>/dev/null"); 339 | 340 | execute_cmd("cp -lR /lib lib"); 341 | execute_cmd("cp -lR /lib64 lib64"); 342 | execute_cmd("cp -lR /usr usr"); 343 | execute_cmd("cp -lR /etc/alternatives etc/alternatives"); 344 | 345 | execute_cmd("mknod -m 0444 dev/urandom c 1 9 &>/dev/null"); 346 | 347 | execute_cmd("chown judger etc &>/dev/null"); 348 | } 349 | 350 | void set_workdir(int rid){ 351 | std::string workdir = std::string(OJ_HOME) + "/run" + std::to_string(rid); 352 | struct stat st = {0}; 353 | if(stat(workdir.c_str(), &st) == -1) { 354 | mkdir(workdir.c_str(), 0700); 355 | chown(workdir.c_str(), JUDGER_UID, JUDGER_UID); 356 | 357 | set_compile_workdir(workdir); 358 | 359 | set_standalone_workdir(workdir); 360 | 361 | set_python_workdir(workdir); 362 | } 363 | chdir(workdir.c_str()); 364 | } 365 | 366 | Json::Value get_solution(int sid){ 367 | std::map par; 368 | par["solution_id"] = std::to_string(sid); 369 | return http_get("/judger/solution", par); 370 | } 371 | 372 | Json::Value get_problem(int pid){ 373 | std::map par; 374 | par["problem_id"] = std::to_string(pid); 375 | return http_get("/judger/problem", par); 376 | } 377 | 378 | bool compile(Json::Value solution, Json::Value problem, std::string &ce){ 379 | const char * CP_C[] = { "gcc", "Main.c", "-o", "Main", "-fno-asm", "-Wall", 380 | "-lm", "--static", "-std=c99", "-DONLINE_JUDGE", NULL }; 381 | const char * CP_X[] = { "g++", "Main.cc", "-o", "Main", "-fno-asm", "-Wall", 382 | "-lm", "--static", "-std=c++14", "-DONLINE_JUDGE", NULL }; 383 | const char * CP_P[] = 384 | { "fpc", "Main.pas","-Cs32000000","-Sh", "-O2", "-Co", 385 | "-Ct", "-Ci", NULL }; 386 | const char * CP_PY[] = {"/bin/cp", "Main.py", "Main", NULL}; 387 | 388 | pid_t pid; 389 | pid = fork(); 390 | if(pid == 0){ 391 | chdir("./compile"); 392 | struct rlimit LIM; 393 | LIM.rlim_max = 60; 394 | LIM.rlim_cur = 60; 395 | setrlimit(RLIMIT_CPU, &LIM); 396 | alarm(60); 397 | LIM.rlim_max = 10 * STD_MB; 398 | LIM.rlim_cur = 10 * STD_MB; 399 | setrlimit(RLIMIT_FSIZE, &LIM); 400 | LIM.rlim_max = STD_MB *256 ; 401 | LIM.rlim_cur = STD_MB *256 ; 402 | setrlimit(RLIMIT_AS, &LIM); 403 | 404 | if(problem["type"].asInt() == 2){//copy interact files 405 | std::string data_dir(OJ_HOME); 406 | data_dir += "/data/" + std::to_string(problem["id"].asInt()); 407 | execute_cmd (("/bin/cp " + data_dir + "/interact.h ./").c_str()); 408 | execute_cmd (("/bin/cp " + data_dir + "/interact.pas ./").c_str()); 409 | execute_cmd (("/bin/cp " + data_dir + 410 | "/interact_main.pas ./Main.pas").c_str()); 411 | } 412 | 413 | chroot("./"); 414 | 415 | while(setgid(JUDGER_UID)!=0) sleep(1); 416 | while(setuid(JUDGER_UID)!=0) sleep(1); 417 | while(setresuid(JUDGER_UID, JUDGER_UID, JUDGER_UID)!=0) sleep(1); 418 | 419 | if (solution["language"].asInt() != 2) { 420 | freopen("ce.txt", "w", stderr); 421 | }else{ 422 | freopen("ce.txt", "w", stdout); 423 | } 424 | 425 | FILE *fsrc; 426 | switch(solution["language"].asInt()){ 427 | case 0: 428 | fsrc = fopen("Main.c", "w"); 429 | break; 430 | case 1: 431 | fsrc = fopen("Main.cc", "w"); 432 | break; 433 | case 2: 434 | if(problem["type"].asInt() == 2){ 435 | fsrc = fopen("solution.pas", "w"); 436 | }else{ 437 | fsrc = fopen("Main.pas", "w"); 438 | } 439 | break; 440 | case 4: 441 | fsrc = fopen("Main.py", "w"); 442 | break; 443 | default: 444 | exit(EXIT_FAILURE); 445 | } 446 | fputs(solution["code"].asString().c_str(), fsrc); 447 | fclose(fsrc); 448 | 449 | switch(solution["language"].asInt()){ 450 | case 0: 451 | execvp(CP_C[0], (char * const *) CP_C); 452 | break; 453 | case 1: 454 | execvp(CP_X[0], (char * const *) CP_X); 455 | break; 456 | case 2: 457 | execvp(CP_P[0], (char * const *) CP_P); 458 | break; 459 | case 4: 460 | execvp(CP_PY[0], (char * const *) CP_PY); 461 | break; 462 | default: 463 | exit(EXIT_FAILURE); 464 | } 465 | exit(EXIT_SUCCESS); 466 | }else{ 467 | int status = 0; 468 | waitpid(pid, &status, 0); 469 | 470 | if(status){ 471 | ce = readFile("./compile/ce.txt"); 472 | }else{ 473 | execute_cmd("/bin/mv ./compile/Main ./Main"); 474 | } 475 | //remove files 476 | if(problem["type"].asInt() == 2){//rm interact files 477 | execute_cmd ("/bin/rm ./compile/interact.h"); 478 | execute_cmd ("/bin/rm ./compile/interact.pas"); 479 | execute_cmd ("/bin/rm ./compile/Main.pas"); 480 | } 481 | execute_cmd ("/bin/rm ./compile/ce.txt"); 482 | switch(solution["language"].asInt()){ 483 | case 0: 484 | execute_cmd ("/bin/rm ./compile/Main.c"); 485 | break; 486 | case 1: 487 | execute_cmd ("/bin/rm ./compile/Main.cc"); 488 | break; 489 | case 2: 490 | if(problem["type"].asInt() == 2){ 491 | execute_cmd ("/bin/rm ./compile/solution.* ./compile/interact.* ./compile/Main.*"); 492 | }else{ 493 | execute_cmd ("/bin/rm ./compile/Main.*"); 494 | } 495 | break; 496 | case 4: 497 | execute_cmd ("/bin/rm ./compile/Main.py"); 498 | break; 499 | default: 500 | exit(EXIT_FAILURE); 501 | } 502 | if(OJ_DEBUG){ 503 | std::cout<<"COMPILE STATUS:"< par; 567 | par["solution_id"] = std::to_string(sid); 568 | par["ce"] = ce.substr(0, 5000); 569 | http_post("/judger/update-ce", par); 570 | } 571 | void update_solution(Json::Value solution){ 572 | Json::FastWriter fastWriter; 573 | std::map par; 574 | par["solution_id"] = std::to_string(solution["id"].asInt()); 575 | par["time_used"] = std::to_string(solution["time_used"].asInt()); 576 | par["memory_used"] = std::to_string(solution["memory_used"].asDouble()); 577 | par["status"] = std::to_string(solution["status"].asInt()); 578 | par["score"] = std::to_string(solution["score"].asInt()); 579 | par["testcases"] = fastWriter.write(solution["testcases"]); 580 | par["cnt_testcases"] =std::to_string(solution["cnt_testcases"].asInt()); 581 | http_post("/judger/update-solution", par); 582 | } 583 | 584 | void run_main(int time_limit, double memory_limit,int language){ 585 | nice(-20); 586 | ptrace(PTRACE_TRACEME, 0, NULL, NULL); 587 | 588 | chroot("./"); 589 | //change user 590 | while (setgid(JUDGER_UID) != 0) 591 | sleep(1); 592 | while (setuid(JUDGER_UID) != 0) 593 | sleep(1); 594 | while (setresuid(JUDGER_UID, JUDGER_UID, JUDGER_UID) != 0) 595 | sleep(1); 596 | 597 | //rlimits: 598 | 599 | //time limit 600 | struct rlimit LIM; 601 | LIM.rlim_max = LIM.rlim_cur = time_limit / 1000 + 1; 602 | setrlimit(RLIMIT_CPU, &LIM); 603 | alarm(0); 604 | alarm((5 * time_limit/1000) + 1); 605 | 606 | //file limit 607 | LIM.rlim_max = STD_F_LIM + STD_MB; 608 | LIM.rlim_cur = STD_F_LIM; 609 | setrlimit(RLIMIT_FSIZE, &LIM); 610 | 611 | //proc limit 612 | LIM.rlim_cur = LIM.rlim_max = 1; 613 | setrlimit(RLIMIT_NPROC, &LIM); 614 | 615 | // set the memory 616 | LIM.rlim_cur = STD_MB * memory_limit / 2 * 3; 617 | LIM.rlim_max = STD_MB * memory_limit * 2; 618 | setrlimit(RLIMIT_AS, &LIM); 619 | 620 | //execute 621 | for(int i=10;i;--i){ 622 | switch(language){ 623 | case 0: //C 624 | case 1: //C++ 625 | case 2: //Pascal 626 | execl("./Main", "./Main", (char *) NULL); 627 | break; 628 | case 4: //python 629 | execl("/usr/bin/python3", "/usr/bin/python3", "Main", (char *) NULL); 630 | break; 631 | } 632 | sleep(1); 633 | } 634 | fflush(stderr); 635 | exit(0); 636 | } 637 | void run_spj(){ 638 | nice(-20); 639 | execute_cmd("/bin/cp ../spj ./spj"); 640 | 641 | chroot("./"); 642 | //change user 643 | while (setgid(JUDGER_UID) != 0) 644 | sleep(1); 645 | while (setuid(JUDGER_UID) != 0) 646 | sleep(1); 647 | while (setresuid(JUDGER_UID, JUDGER_UID, JUDGER_UID) != 0) 648 | sleep(1); 649 | 650 | //rlimits: 651 | 652 | struct rlimit LIM; 653 | LIM.rlim_max = 60; 654 | LIM.rlim_cur = 60; 655 | setrlimit(RLIMIT_CPU, &LIM); 656 | alarm(60); 657 | LIM.rlim_max = 10 * STD_MB; 658 | LIM.rlim_cur = 10 * STD_MB; 659 | setrlimit(RLIMIT_FSIZE, &LIM); 660 | LIM.rlim_max = STD_MB *256 ; 661 | LIM.rlim_cur = STD_MB *256 ; 662 | setrlimit(RLIMIT_AS, &LIM); 663 | 664 | //execute 665 | execl("./spj", "./spj", "./data.in", "user.out", "data.ans", 666 | "verdict.out", "score.out", "checklog.out", "meta.out", 667 | (char *) NULL); 668 | exit(0); 669 | } 670 | 671 | bool watch_main(pid_t pidApp, Json::Value problem, 672 | int time_limit, double memory_limit, 673 | int &time_used, double &memory_used, std::string &verdict 674 | ){ 675 | if(OJ_DEBUG){ 676 | std::cout<<"watch solution "< memory_used){ 693 | memory_used = tempmemory; 694 | if(memory_used > memory_limit*STD_MB){ 695 | verdict = "MLE"; 696 | ptrace(PTRACE_KILL, pidApp, NULL, NULL); 697 | success = false; 698 | break; 699 | } 700 | } 701 | 702 | //check runtime error 703 | if(WIFEXITED(status)){ 704 | break; 705 | } 706 | if(get_file_size("./error.out")){ 707 | verdict = "RE"; 708 | ptrace(PTRACE_KILL, pidApp, NULL, NULL); 709 | success = false; 710 | break; 711 | } 712 | exitcode = WEXITSTATUS(status); 713 | if(exitcode == 0x05 || exitcode == 0){ 714 | //go on; 715 | ; 716 | }else{ 717 | switch(exitcode){ 718 | case SIGCHLD: 719 | case SIGALRM: 720 | alarm(0); 721 | case SIGKILL: 722 | case SIGXCPU: 723 | time_used = (time_limit / 1000 + 1)*1000; 724 | verdict = "TLE"; 725 | break; 726 | case SIGXFSZ: 727 | verdict = "OLE"; 728 | break; 729 | default: 730 | verdict = "RE"; 731 | } 732 | print_runtimeerror(strsignal(exitcode)); 733 | success = false; 734 | ptrace(PTRACE_KILL, pidApp, NULL, NULL); 735 | break; 736 | } 737 | if(WIFSIGNALED(status)){ 738 | sig = WTERMSIG(status); 739 | switch(sig){ 740 | case SIGCHLD: 741 | case SIGALRM: 742 | alarm(0); 743 | case SIGKILL: 744 | case SIGXCPU: 745 | time_used = (time_limit / 1000 + 1)*1000; 746 | verdict = "TLE"; 747 | break; 748 | case SIGXFSZ: 749 | verdict = "OLE"; 750 | break; 751 | default: 752 | verdict = "RE"; 753 | } 754 | print_runtimeerror(strsignal(exitcode)); 755 | success = false; 756 | break; 757 | } 758 | 759 | //check the system calls 760 | ptrace(PTRACE_GETREGS, pidApp, NULL, ®); 761 | if(allowed_calls[reg.REG_SYSCALL]){ 762 | }else{ 763 | verdict = "RE"; 764 | success = false; 765 | char error[BUFFER_SIZE]; 766 | sprintf(error, 767 | "[ERROR] A Not allowed system call:%ld\n" 768 | " TO FIX THIS , ask admin to add the CALLID into" 769 | "corresponding LANG_XXV[] located at okcalls32/64.h ," 770 | "and recompile judger. \n", 771 | (long)reg.REG_SYSCALL); 772 | print_runtimeerror(error); 773 | ptrace(PTRACE_KILL, pidApp, NULL, NULL); 774 | } 775 | ptrace(PTRACE_SYSCALL, pidApp, NULL, NULL); 776 | } 777 | if(!time_used){ 778 | time_used=(ruse.ru_utime.tv_sec * 1000 + ruse.ru_utime.tv_usec / 1000); 779 | time_used+=(ruse.ru_stime.tv_sec * 1000 + ruse.ru_stime.tv_usec / 1000); 780 | } 781 | if(time_used > time_limit){ 782 | verdict = "TLE"; 783 | success = false; 784 | } 785 | if(OJ_DEBUG){ 786 | std::cout<<"time_used:"< par; 796 | par["solution_id"] = std::to_string(solution["id"].asInt()); 797 | par["filename"] = filename; 798 | Json::Value res = http_get("/judger/get-answer", par); 799 | return res["answer"].asString(); 800 | } 801 | 802 | void gen_solution_meta(Json::Value solution){ 803 | FILE *meta = fopen("meta.out", "w"); 804 | fprintf(meta, "%d\n", solution["user_id"].asInt()); 805 | 806 | fclose(meta); 807 | } 808 | 809 | Json::Value run_testcase(Json::Value &solution, Json::Value problem, 810 | int time_limit, double memory_limit, 811 | std::string data_dir, std::string testcase_name){ 812 | Json::Value testcase; 813 | int time_used; 814 | double memory_used; 815 | std::string verdict; 816 | pid_t spj_pid; 817 | int spj_main[2],main_spj[2]; 818 | 819 | int language = solution["language"].asInt(); 820 | if(language == 4){//python 821 | chdir("./python"); 822 | }else{ 823 | chdir("./standalone"); 824 | } 825 | 826 | execute_cmd("/bin/cp %s/%s.in ./data.in", 827 | data_dir.c_str(), testcase_name.c_str()); 828 | testcase["solution_id"] = solution["id"].asInt(); 829 | testcase["filename"] = testcase_name; 830 | 831 | int problemType = problem["type"].asInt(); 832 | 833 | if(problem["spj"].asBool() || problemType == 2){ 834 | gen_solution_meta(solution); 835 | } 836 | 837 | if(problemType != 3){//execute solution if needed 838 | execute_cmd("/bin/cp ../Main ./Main"); 839 | 840 | if(problemType == 2){//create pipe & run spj first 841 | while(pipe(spj_main) == -1) sleep(3); 842 | while(pipe(main_spj) == -1) sleep(3); 843 | 844 | spj_pid = fork(); 845 | if(spj_pid == 0){ 846 | dup2(main_spj[0],STDIN_FILENO); 847 | dup2(spj_main[1],STDOUT_FILENO); 848 | close(main_spj[1]);close(spj_main[0]); 849 | run_spj(); 850 | exit(EXIT_SUCCESS); 851 | }else{ 852 | close(main_spj[0]); 853 | close(spj_main[1]); 854 | } 855 | } 856 | 857 | pid_t pidApp = fork(); 858 | if(pidApp == 0){ 859 | if(problemType == 1){ 860 | freopen("./data.in", "r", stdin); 861 | freopen("./user.out", "w", stdout); 862 | freopen("./error.out", "w", stderr); 863 | }else{ 864 | dup2(spj_main[0],STDIN_FILENO); 865 | dup2(main_spj[1],STDOUT_FILENO); 866 | close(spj_main[1]);close(main_spj[0]); 867 | freopen("./error.out", "w", stderr); 868 | } 869 | run_main(time_limit, memory_limit, solution["language"].asInt()); 870 | exit(EXIT_SUCCESS); 871 | }else{ 872 | if(problemType == 2){ 873 | close(spj_main[0]); 874 | close(main_spj[1]); 875 | } 876 | } 877 | bool success = watch_main(pidApp, problem, time_limit, memory_limit, 878 | time_used, memory_used, verdict); 879 | testcase["time_used"] = time_used; 880 | testcase["memory_used"] = memory_used; 881 | if(time_used > solution["time_used"].asInt()){ 882 | solution["time_used"] = time_used; 883 | } 884 | if(memory_used > solution["memory_used"].asDouble()){ 885 | solution["memory_used"] = memory_used; 886 | } 887 | if(!success){ 888 | testcase["verdict"] = verdict; 889 | testcase["score"] = 0; 890 | testcase["checklog"] = ""; 891 | if(problemType == 2){ 892 | kill(spj_pid, SIGKILL); 893 | } 894 | return testcase; 895 | } 896 | }else if(problemType == 3){//generate .out file 897 | std::string answer = get_answer(solution, testcase_name); 898 | if(OJ_DEBUG){ 899 | std::cout<<"answer:<"<"< test_names; 988 | while((dirp = readdir(dp)) != NULL){ 989 | // check if the file is *.in or not 990 | // if yes, return name length 991 | // otherwise, return 0 992 | int namelen = isInFile(dirp->d_name); 993 | if(namelen == 0) continue; 994 | 995 | std::string testcase_name(dirp->d_name); 996 | testcase_name = testcase_name.substr(0,namelen); 997 | 998 | test_names.insert(testcase_name); 999 | } 1000 | closedir(dp); 1001 | 1002 | solution["cnt_testcases"] = test_names.size(); 1003 | solution["status"] = SL_RUNNING; 1004 | update_solution(solution); 1005 | 1006 | int user_wait_time = 0; 1007 | for(auto const &t: test_names){ 1008 | Json::Value testcase = run_testcase(solution, problem, 1009 | time_limit, memory_limit, 1010 | data_dir, t); 1011 | solution["testcases"].append(testcase); 1012 | user_wait_time += testcase["time_used"].asInt(); 1013 | if(user_wait_time >= 300){ 1014 | update_solution(solution); 1015 | user_wait_time = 0; 1016 | } 1017 | } 1018 | 1019 | /* 1020 | while((dirp = readdir(dp)) != NULL){ 1021 | if(OJ_DEBUG){ 1022 | std::cout<<"found testcase:"< par; 1033 | par["solution_id"] = std::to_string(solution["id"].asInt()); 1034 | http_post("/judger/finish-judging", par); 1035 | } 1036 | 1037 | void judge_solution(int sid, int rid){ 1038 | if(OJ_DEBUG){ 1039 | std::cout<<"judging solution "< MAX_TIME_LIMIT) 1060 | time_limit = MAX_TIME_LIMIT; 1061 | if(mem_limit > MAX_MEM_LIMIT) 1062 | mem_limit = MAX_MEM_LIMIT; 1063 | 1064 | /*compile*/ 1065 | if(problem["type"].asInt() != 3){//compile if is not "submit-answer prolem" 1066 | std::string ce; 1067 | if(compile(solution, problem, ce)){ 1068 | if(OJ_DEBUG){ 1069 | std::cout<<"compile error!"< 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | 676 | -------------------------------------------------------------------------------- /src/Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.15.1 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994-2017 Free Software Foundation, Inc. 5 | 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | @SET_MAKE@ 16 | 17 | VPATH = @srcdir@ 18 | am__is_gnu_make = { \ 19 | if test -z '$(MAKELEVEL)'; then \ 20 | false; \ 21 | elif test -n '$(MAKE_HOST)'; then \ 22 | true; \ 23 | elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ 24 | true; \ 25 | else \ 26 | false; \ 27 | fi; \ 28 | } 29 | am__make_running_with_option = \ 30 | case $${target_option-} in \ 31 | ?) ;; \ 32 | *) echo "am__make_running_with_option: internal error: invalid" \ 33 | "target option '$${target_option-}' specified" >&2; \ 34 | exit 1;; \ 35 | esac; \ 36 | has_opt=no; \ 37 | sane_makeflags=$$MAKEFLAGS; \ 38 | if $(am__is_gnu_make); then \ 39 | sane_makeflags=$$MFLAGS; \ 40 | else \ 41 | case $$MAKEFLAGS in \ 42 | *\\[\ \ ]*) \ 43 | bs=\\; \ 44 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ 45 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ 46 | esac; \ 47 | fi; \ 48 | skip_next=no; \ 49 | strip_trailopt () \ 50 | { \ 51 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ 52 | }; \ 53 | for flg in $$sane_makeflags; do \ 54 | test $$skip_next = yes && { skip_next=no; continue; }; \ 55 | case $$flg in \ 56 | *=*|--*) continue;; \ 57 | -*I) strip_trailopt 'I'; skip_next=yes;; \ 58 | -*I?*) strip_trailopt 'I';; \ 59 | -*O) strip_trailopt 'O'; skip_next=yes;; \ 60 | -*O?*) strip_trailopt 'O';; \ 61 | -*l) strip_trailopt 'l'; skip_next=yes;; \ 62 | -*l?*) strip_trailopt 'l';; \ 63 | -[dEDm]) skip_next=yes;; \ 64 | -[JT]) skip_next=yes;; \ 65 | esac; \ 66 | case $$flg in \ 67 | *$$target_option*) has_opt=yes; break;; \ 68 | esac; \ 69 | done; \ 70 | test $$has_opt = yes 71 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) 72 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 73 | pkgdatadir = $(datadir)/@PACKAGE@ 74 | pkgincludedir = $(includedir)/@PACKAGE@ 75 | pkglibdir = $(libdir)/@PACKAGE@ 76 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 77 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 78 | install_sh_DATA = $(install_sh) -c -m 644 79 | install_sh_PROGRAM = $(install_sh) -c 80 | install_sh_SCRIPT = $(install_sh) -c 81 | INSTALL_HEADER = $(INSTALL_DATA) 82 | transform = $(program_transform_name) 83 | NORMAL_INSTALL = : 84 | PRE_INSTALL = : 85 | POST_INSTALL = : 86 | NORMAL_UNINSTALL = : 87 | PRE_UNINSTALL = : 88 | POST_UNINSTALL = : 89 | build_triplet = @build@ 90 | host_triplet = @host@ 91 | bin_PROGRAMS = wzoj_judger$(EXEEXT) 92 | subdir = src 93 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 94 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 95 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 96 | $(ACLOCAL_M4) 97 | DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) 98 | mkinstalldirs = $(install_sh) -d 99 | CONFIG_HEADER = $(top_builddir)/config.h 100 | CONFIG_CLEAN_FILES = 101 | CONFIG_CLEAN_VPATH_FILES = 102 | am__installdirs = "$(DESTDIR)$(bindir)" 103 | PROGRAMS = $(bin_PROGRAMS) 104 | am_wzoj_judger_OBJECTS = wzoj_judger-main.$(OBJEXT) \ 105 | wzoj_judger-version.$(OBJEXT) wzoj_judger-daemon.$(OBJEXT) \ 106 | wzoj_judger-http.$(OBJEXT) wzoj_judger-jsoncpp.$(OBJEXT) \ 107 | wzoj_judger-judger.$(OBJEXT) wzoj_judger-sim.$(OBJEXT) \ 108 | wzoj_judger-udp-listen.$(OBJEXT) 109 | wzoj_judger_OBJECTS = $(am_wzoj_judger_OBJECTS) 110 | am__DEPENDENCIES_1 = 111 | wzoj_judger_DEPENDENCIES = $(am__DEPENDENCIES_1) 112 | AM_V_lt = $(am__v_lt_@AM_V@) 113 | am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) 114 | am__v_lt_0 = --silent 115 | am__v_lt_1 = 116 | wzoj_judger_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ 117 | $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(wzoj_judger_CXXFLAGS) \ 118 | $(CXXFLAGS) $(wzoj_judger_LDFLAGS) $(LDFLAGS) -o $@ 119 | AM_V_P = $(am__v_P_@AM_V@) 120 | am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) 121 | am__v_P_0 = false 122 | am__v_P_1 = : 123 | AM_V_GEN = $(am__v_GEN_@AM_V@) 124 | am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) 125 | am__v_GEN_0 = @echo " GEN " $@; 126 | am__v_GEN_1 = 127 | AM_V_at = $(am__v_at_@AM_V@) 128 | am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) 129 | am__v_at_0 = @ 130 | am__v_at_1 = 131 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) 132 | depcomp = $(SHELL) $(top_srcdir)/depcomp 133 | am__depfiles_maybe = depfiles 134 | am__mv = mv -f 135 | CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 136 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) 137 | LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ 138 | $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ 139 | $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ 140 | $(AM_CXXFLAGS) $(CXXFLAGS) 141 | AM_V_CXX = $(am__v_CXX_@AM_V@) 142 | am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) 143 | am__v_CXX_0 = @echo " CXX " $@; 144 | am__v_CXX_1 = 145 | CXXLD = $(CXX) 146 | CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ 147 | $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ 148 | $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 149 | AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) 150 | am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) 151 | am__v_CXXLD_0 = @echo " CXXLD " $@; 152 | am__v_CXXLD_1 = 153 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 154 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 155 | LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ 156 | $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ 157 | $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ 158 | $(AM_CFLAGS) $(CFLAGS) 159 | AM_V_CC = $(am__v_CC_@AM_V@) 160 | am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) 161 | am__v_CC_0 = @echo " CC " $@; 162 | am__v_CC_1 = 163 | CCLD = $(CC) 164 | LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ 165 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ 166 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ 167 | AM_V_CCLD = $(am__v_CCLD_@AM_V@) 168 | am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) 169 | am__v_CCLD_0 = @echo " CCLD " $@; 170 | am__v_CCLD_1 = 171 | SOURCES = $(wzoj_judger_SOURCES) 172 | DIST_SOURCES = $(wzoj_judger_SOURCES) 173 | am__can_run_installinfo = \ 174 | case $$AM_UPDATE_INFO_DIR in \ 175 | n|no|NO) false;; \ 176 | *) (install-info --version) >/dev/null 2>&1;; \ 177 | esac 178 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) 179 | # Read a list of newline-separated strings from the standard input, 180 | # and print each of them once, without duplicates. Input order is 181 | # *not* preserved. 182 | am__uniquify_input = $(AWK) '\ 183 | BEGIN { nonempty = 0; } \ 184 | { items[$$0] = 1; nonempty = 1; } \ 185 | END { if (nonempty) { for (i in items) print i; }; } \ 186 | ' 187 | # Make sure the list of sources is unique. This is necessary because, 188 | # e.g., the same source file might be shared among _SOURCES variables 189 | # for different programs/libraries. 190 | am__define_uniq_tagged_files = \ 191 | list='$(am__tagged_files)'; \ 192 | unique=`for i in $$list; do \ 193 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 194 | done | $(am__uniquify_input)` 195 | ETAGS = etags 196 | CTAGS = ctags 197 | am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp 198 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 199 | ACLOCAL = @ACLOCAL@ 200 | ALL_LINGUAS = @ALL_LINGUAS@ 201 | AMTAR = @AMTAR@ 202 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 203 | AR = @AR@ 204 | AUTOCONF = @AUTOCONF@ 205 | AUTOHEADER = @AUTOHEADER@ 206 | AUTOMAKE = @AUTOMAKE@ 207 | AWK = @AWK@ 208 | CATALOGS = @CATALOGS@ 209 | CATOBJEXT = @CATOBJEXT@ 210 | CC = @CC@ 211 | CCDEPMODE = @CCDEPMODE@ 212 | CFLAGS = @CFLAGS@ 213 | CPP = @CPP@ 214 | CPPFLAGS = @CPPFLAGS@ 215 | CXX = @CXX@ 216 | CXXCPP = @CXXCPP@ 217 | CXXDEPMODE = @CXXDEPMODE@ 218 | CXXFLAGS = @CXXFLAGS@ 219 | CYGPATH_W = @CYGPATH_W@ 220 | DATADIRNAME = @DATADIRNAME@ 221 | DEFS = @DEFS@ 222 | DEPDIR = @DEPDIR@ 223 | DLLTOOL = @DLLTOOL@ 224 | DSYMUTIL = @DSYMUTIL@ 225 | DUMPBIN = @DUMPBIN@ 226 | ECHO_C = @ECHO_C@ 227 | ECHO_N = @ECHO_N@ 228 | ECHO_T = @ECHO_T@ 229 | EGREP = @EGREP@ 230 | EXEEXT = @EXEEXT@ 231 | FGREP = @FGREP@ 232 | GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ 233 | GMOFILES = @GMOFILES@ 234 | GMSGFMT = @GMSGFMT@ 235 | GREP = @GREP@ 236 | INSTALL = @INSTALL@ 237 | INSTALL_DATA = @INSTALL_DATA@ 238 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 239 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 240 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 241 | INSTOBJEXT = @INSTOBJEXT@ 242 | INTLLIBS = @INTLLIBS@ 243 | INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ 244 | INTLTOOL_MERGE = @INTLTOOL_MERGE@ 245 | INTLTOOL_PERL = @INTLTOOL_PERL@ 246 | INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ 247 | INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ 248 | INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ 249 | INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ 250 | INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ 251 | INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ 252 | LD = @LD@ 253 | LDFLAGS = @LDFLAGS@ 254 | LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ 255 | LIBCURL_LIBS = @LIBCURL_LIBS@ 256 | LIBOBJS = @LIBOBJS@ 257 | LIBS = @LIBS@ 258 | LIBTOOL = @LIBTOOL@ 259 | LIPO = @LIPO@ 260 | LN_S = @LN_S@ 261 | LTLIBOBJS = @LTLIBOBJS@ 262 | LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ 263 | MAKEINFO = @MAKEINFO@ 264 | MANIFEST_TOOL = @MANIFEST_TOOL@ 265 | MKDIR_P = @MKDIR_P@ 266 | MKINSTALLDIRS = @MKINSTALLDIRS@ 267 | MSGFMT = @MSGFMT@ 268 | MSGFMT_OPTS = @MSGFMT_OPTS@ 269 | MSGMERGE = @MSGMERGE@ 270 | NM = @NM@ 271 | NMEDIT = @NMEDIT@ 272 | OBJDUMP = @OBJDUMP@ 273 | OBJEXT = @OBJEXT@ 274 | OTOOL = @OTOOL@ 275 | OTOOL64 = @OTOOL64@ 276 | PACKAGE = @PACKAGE@ 277 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 278 | PACKAGE_NAME = @PACKAGE_NAME@ 279 | PACKAGE_STRING = @PACKAGE_STRING@ 280 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 281 | PACKAGE_URL = @PACKAGE_URL@ 282 | PACKAGE_VERSION = @PACKAGE_VERSION@ 283 | PATH_SEPARATOR = @PATH_SEPARATOR@ 284 | PKG_CONFIG = @PKG_CONFIG@ 285 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ 286 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ 287 | POFILES = @POFILES@ 288 | POSUB = @POSUB@ 289 | PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ 290 | PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ 291 | RANLIB = @RANLIB@ 292 | SED = @SED@ 293 | SET_MAKE = @SET_MAKE@ 294 | SHELL = @SHELL@ 295 | STRIP = @STRIP@ 296 | USE_NLS = @USE_NLS@ 297 | VERSION = @VERSION@ 298 | XGETTEXT = @XGETTEXT@ 299 | abs_builddir = @abs_builddir@ 300 | abs_srcdir = @abs_srcdir@ 301 | abs_top_builddir = @abs_top_builddir@ 302 | abs_top_srcdir = @abs_top_srcdir@ 303 | ac_ct_AR = @ac_ct_AR@ 304 | ac_ct_CC = @ac_ct_CC@ 305 | ac_ct_CXX = @ac_ct_CXX@ 306 | ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 307 | am__include = @am__include@ 308 | am__leading_dot = @am__leading_dot@ 309 | am__quote = @am__quote@ 310 | am__tar = @am__tar@ 311 | am__untar = @am__untar@ 312 | bindir = @bindir@ 313 | build = @build@ 314 | build_alias = @build_alias@ 315 | build_cpu = @build_cpu@ 316 | build_os = @build_os@ 317 | build_vendor = @build_vendor@ 318 | builddir = @builddir@ 319 | datadir = @datadir@ 320 | datarootdir = @datarootdir@ 321 | docdir = @docdir@ 322 | dvidir = @dvidir@ 323 | exec_prefix = @exec_prefix@ 324 | host = @host@ 325 | host_alias = @host_alias@ 326 | host_cpu = @host_cpu@ 327 | host_os = @host_os@ 328 | host_vendor = @host_vendor@ 329 | htmldir = @htmldir@ 330 | includedir = @includedir@ 331 | infodir = @infodir@ 332 | install_sh = @install_sh@ 333 | intltool__v_merge_options_ = @intltool__v_merge_options_@ 334 | intltool__v_merge_options_0 = @intltool__v_merge_options_0@ 335 | libdir = @libdir@ 336 | libexecdir = @libexecdir@ 337 | localedir = @localedir@ 338 | localstatedir = @localstatedir@ 339 | mandir = @mandir@ 340 | mkdir_p = @mkdir_p@ 341 | oldincludedir = @oldincludedir@ 342 | pdfdir = @pdfdir@ 343 | prefix = @prefix@ 344 | program_transform_name = @program_transform_name@ 345 | psdir = @psdir@ 346 | sbindir = @sbindir@ 347 | sharedstatedir = @sharedstatedir@ 348 | srcdir = @srcdir@ 349 | sysconfdir = @sysconfdir@ 350 | target_alias = @target_alias@ 351 | top_build_prefix = @top_build_prefix@ 352 | top_builddir = @top_builddir@ 353 | top_srcdir = @top_srcdir@ 354 | AM_CPPFLAGS = \ 355 | -DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \ 356 | -DPACKAGE_SRC_DIR=\""$(srcdir). \ 357 | $(LIBCURL_CFLAGS). \ 358 | $(jsoncpp_CFLAGS). \ 359 | $(jsoncpp_CFLAGS)"\" \ 360 | -DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" 361 | 362 | AM_CFLAGS = \ 363 | -Wall\ 364 | -g 365 | 366 | wzoj_judger_SOURCES = \ 367 | main.cc \ 368 | wzoj-judger.h \ 369 | version.cc \ 370 | daemon.cc \ 371 | http.cc \ 372 | jsoncpp.cpp \ 373 | json/json-forwards.h \ 374 | json/json.h \ 375 | judger.cc \ 376 | okcalls64.h \ 377 | okcalls32.h \ 378 | sim.cc \ 379 | udp-listen.cc 380 | 381 | wzoj_judger_CXXFLAGS = -std=c++11 382 | wzoj_judger_LDFLAGS = 383 | wzoj_judger_LDADD = $(LIBCURL_LIBS) 384 | all: all-am 385 | 386 | .SUFFIXES: 387 | .SUFFIXES: .cc .cpp .lo .o .obj 388 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 389 | @for dep in $?; do \ 390 | case '$(am__configure_deps)' in \ 391 | *$$dep*) \ 392 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ 393 | && { if test -f $@; then exit 0; else break; fi; }; \ 394 | exit 1;; \ 395 | esac; \ 396 | done; \ 397 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ 398 | $(am__cd) $(top_srcdir) && \ 399 | $(AUTOMAKE) --gnu src/Makefile 400 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 401 | @case '$?' in \ 402 | *config.status*) \ 403 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ 404 | *) \ 405 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ 406 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 407 | esac; 408 | 409 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 410 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 411 | 412 | $(top_srcdir)/configure: $(am__configure_deps) 413 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 414 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 415 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 416 | $(am__aclocal_m4_deps): 417 | install-binPROGRAMS: $(bin_PROGRAMS) 418 | @$(NORMAL_INSTALL) 419 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 420 | if test -n "$$list"; then \ 421 | echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ 422 | $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ 423 | fi; \ 424 | for p in $$list; do echo "$$p $$p"; done | \ 425 | sed 's/$(EXEEXT)$$//' | \ 426 | while read p p1; do if test -f $$p \ 427 | || test -f $$p1 \ 428 | ; then echo "$$p"; echo "$$p"; else :; fi; \ 429 | done | \ 430 | sed -e 'p;s,.*/,,;n;h' \ 431 | -e 's|.*|.|' \ 432 | -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ 433 | sed 'N;N;N;s,\n, ,g' | \ 434 | $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ 435 | { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ 436 | if ($$2 == $$4) files[d] = files[d] " " $$1; \ 437 | else { print "f", $$3 "/" $$4, $$1; } } \ 438 | END { for (d in files) print "f", d, files[d] }' | \ 439 | while read type dir files; do \ 440 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ 441 | test -z "$$files" || { \ 442 | echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ 443 | $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ 444 | } \ 445 | ; done 446 | 447 | uninstall-binPROGRAMS: 448 | @$(NORMAL_UNINSTALL) 449 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 450 | files=`for p in $$list; do echo "$$p"; done | \ 451 | sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ 452 | -e 's/$$/$(EXEEXT)/' \ 453 | `; \ 454 | test -n "$$list" || exit 0; \ 455 | echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ 456 | cd "$(DESTDIR)$(bindir)" && rm -f $$files 457 | 458 | clean-binPROGRAMS: 459 | @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ 460 | echo " rm -f" $$list; \ 461 | rm -f $$list || exit $$?; \ 462 | test -n "$(EXEEXT)" || exit 0; \ 463 | list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ 464 | echo " rm -f" $$list; \ 465 | rm -f $$list 466 | 467 | wzoj_judger$(EXEEXT): $(wzoj_judger_OBJECTS) $(wzoj_judger_DEPENDENCIES) $(EXTRA_wzoj_judger_DEPENDENCIES) 468 | @rm -f wzoj_judger$(EXEEXT) 469 | $(AM_V_CXXLD)$(wzoj_judger_LINK) $(wzoj_judger_OBJECTS) $(wzoj_judger_LDADD) $(LIBS) 470 | 471 | mostlyclean-compile: 472 | -rm -f *.$(OBJEXT) 473 | 474 | distclean-compile: 475 | -rm -f *.tab.c 476 | 477 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wzoj_judger-daemon.Po@am__quote@ 478 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wzoj_judger-http.Po@am__quote@ 479 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wzoj_judger-jsoncpp.Po@am__quote@ 480 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wzoj_judger-judger.Po@am__quote@ 481 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wzoj_judger-main.Po@am__quote@ 482 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wzoj_judger-sim.Po@am__quote@ 483 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wzoj_judger-udp-listen.Po@am__quote@ 484 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wzoj_judger-version.Po@am__quote@ 485 | 486 | .cc.o: 487 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 488 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 489 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 490 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 491 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< 492 | 493 | .cc.obj: 494 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` 495 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 496 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 497 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 498 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 499 | 500 | .cc.lo: 501 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 502 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo 503 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ 504 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 505 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< 506 | 507 | wzoj_judger-main.o: main.cc 508 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -MT wzoj_judger-main.o -MD -MP -MF $(DEPDIR)/wzoj_judger-main.Tpo -c -o wzoj_judger-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc 509 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wzoj_judger-main.Tpo $(DEPDIR)/wzoj_judger-main.Po 510 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='main.cc' object='wzoj_judger-main.o' libtool=no @AMDEPBACKSLASH@ 511 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 512 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -c -o wzoj_judger-main.o `test -f 'main.cc' || echo '$(srcdir)/'`main.cc 513 | 514 | wzoj_judger-main.obj: main.cc 515 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -MT wzoj_judger-main.obj -MD -MP -MF $(DEPDIR)/wzoj_judger-main.Tpo -c -o wzoj_judger-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi` 516 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wzoj_judger-main.Tpo $(DEPDIR)/wzoj_judger-main.Po 517 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='main.cc' object='wzoj_judger-main.obj' libtool=no @AMDEPBACKSLASH@ 518 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 519 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -c -o wzoj_judger-main.obj `if test -f 'main.cc'; then $(CYGPATH_W) 'main.cc'; else $(CYGPATH_W) '$(srcdir)/main.cc'; fi` 520 | 521 | wzoj_judger-version.o: version.cc 522 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -MT wzoj_judger-version.o -MD -MP -MF $(DEPDIR)/wzoj_judger-version.Tpo -c -o wzoj_judger-version.o `test -f 'version.cc' || echo '$(srcdir)/'`version.cc 523 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wzoj_judger-version.Tpo $(DEPDIR)/wzoj_judger-version.Po 524 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='version.cc' object='wzoj_judger-version.o' libtool=no @AMDEPBACKSLASH@ 525 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 526 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -c -o wzoj_judger-version.o `test -f 'version.cc' || echo '$(srcdir)/'`version.cc 527 | 528 | wzoj_judger-version.obj: version.cc 529 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -MT wzoj_judger-version.obj -MD -MP -MF $(DEPDIR)/wzoj_judger-version.Tpo -c -o wzoj_judger-version.obj `if test -f 'version.cc'; then $(CYGPATH_W) 'version.cc'; else $(CYGPATH_W) '$(srcdir)/version.cc'; fi` 530 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wzoj_judger-version.Tpo $(DEPDIR)/wzoj_judger-version.Po 531 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='version.cc' object='wzoj_judger-version.obj' libtool=no @AMDEPBACKSLASH@ 532 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 533 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -c -o wzoj_judger-version.obj `if test -f 'version.cc'; then $(CYGPATH_W) 'version.cc'; else $(CYGPATH_W) '$(srcdir)/version.cc'; fi` 534 | 535 | wzoj_judger-daemon.o: daemon.cc 536 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -MT wzoj_judger-daemon.o -MD -MP -MF $(DEPDIR)/wzoj_judger-daemon.Tpo -c -o wzoj_judger-daemon.o `test -f 'daemon.cc' || echo '$(srcdir)/'`daemon.cc 537 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wzoj_judger-daemon.Tpo $(DEPDIR)/wzoj_judger-daemon.Po 538 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='daemon.cc' object='wzoj_judger-daemon.o' libtool=no @AMDEPBACKSLASH@ 539 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 540 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -c -o wzoj_judger-daemon.o `test -f 'daemon.cc' || echo '$(srcdir)/'`daemon.cc 541 | 542 | wzoj_judger-daemon.obj: daemon.cc 543 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -MT wzoj_judger-daemon.obj -MD -MP -MF $(DEPDIR)/wzoj_judger-daemon.Tpo -c -o wzoj_judger-daemon.obj `if test -f 'daemon.cc'; then $(CYGPATH_W) 'daemon.cc'; else $(CYGPATH_W) '$(srcdir)/daemon.cc'; fi` 544 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wzoj_judger-daemon.Tpo $(DEPDIR)/wzoj_judger-daemon.Po 545 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='daemon.cc' object='wzoj_judger-daemon.obj' libtool=no @AMDEPBACKSLASH@ 546 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 547 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -c -o wzoj_judger-daemon.obj `if test -f 'daemon.cc'; then $(CYGPATH_W) 'daemon.cc'; else $(CYGPATH_W) '$(srcdir)/daemon.cc'; fi` 548 | 549 | wzoj_judger-http.o: http.cc 550 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -MT wzoj_judger-http.o -MD -MP -MF $(DEPDIR)/wzoj_judger-http.Tpo -c -o wzoj_judger-http.o `test -f 'http.cc' || echo '$(srcdir)/'`http.cc 551 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wzoj_judger-http.Tpo $(DEPDIR)/wzoj_judger-http.Po 552 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='http.cc' object='wzoj_judger-http.o' libtool=no @AMDEPBACKSLASH@ 553 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 554 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -c -o wzoj_judger-http.o `test -f 'http.cc' || echo '$(srcdir)/'`http.cc 555 | 556 | wzoj_judger-http.obj: http.cc 557 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -MT wzoj_judger-http.obj -MD -MP -MF $(DEPDIR)/wzoj_judger-http.Tpo -c -o wzoj_judger-http.obj `if test -f 'http.cc'; then $(CYGPATH_W) 'http.cc'; else $(CYGPATH_W) '$(srcdir)/http.cc'; fi` 558 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wzoj_judger-http.Tpo $(DEPDIR)/wzoj_judger-http.Po 559 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='http.cc' object='wzoj_judger-http.obj' libtool=no @AMDEPBACKSLASH@ 560 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 561 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -c -o wzoj_judger-http.obj `if test -f 'http.cc'; then $(CYGPATH_W) 'http.cc'; else $(CYGPATH_W) '$(srcdir)/http.cc'; fi` 562 | 563 | wzoj_judger-jsoncpp.o: jsoncpp.cpp 564 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -MT wzoj_judger-jsoncpp.o -MD -MP -MF $(DEPDIR)/wzoj_judger-jsoncpp.Tpo -c -o wzoj_judger-jsoncpp.o `test -f 'jsoncpp.cpp' || echo '$(srcdir)/'`jsoncpp.cpp 565 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wzoj_judger-jsoncpp.Tpo $(DEPDIR)/wzoj_judger-jsoncpp.Po 566 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='jsoncpp.cpp' object='wzoj_judger-jsoncpp.o' libtool=no @AMDEPBACKSLASH@ 567 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 568 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -c -o wzoj_judger-jsoncpp.o `test -f 'jsoncpp.cpp' || echo '$(srcdir)/'`jsoncpp.cpp 569 | 570 | wzoj_judger-jsoncpp.obj: jsoncpp.cpp 571 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -MT wzoj_judger-jsoncpp.obj -MD -MP -MF $(DEPDIR)/wzoj_judger-jsoncpp.Tpo -c -o wzoj_judger-jsoncpp.obj `if test -f 'jsoncpp.cpp'; then $(CYGPATH_W) 'jsoncpp.cpp'; else $(CYGPATH_W) '$(srcdir)/jsoncpp.cpp'; fi` 572 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wzoj_judger-jsoncpp.Tpo $(DEPDIR)/wzoj_judger-jsoncpp.Po 573 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='jsoncpp.cpp' object='wzoj_judger-jsoncpp.obj' libtool=no @AMDEPBACKSLASH@ 574 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 575 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -c -o wzoj_judger-jsoncpp.obj `if test -f 'jsoncpp.cpp'; then $(CYGPATH_W) 'jsoncpp.cpp'; else $(CYGPATH_W) '$(srcdir)/jsoncpp.cpp'; fi` 576 | 577 | wzoj_judger-judger.o: judger.cc 578 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -MT wzoj_judger-judger.o -MD -MP -MF $(DEPDIR)/wzoj_judger-judger.Tpo -c -o wzoj_judger-judger.o `test -f 'judger.cc' || echo '$(srcdir)/'`judger.cc 579 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wzoj_judger-judger.Tpo $(DEPDIR)/wzoj_judger-judger.Po 580 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='judger.cc' object='wzoj_judger-judger.o' libtool=no @AMDEPBACKSLASH@ 581 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 582 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -c -o wzoj_judger-judger.o `test -f 'judger.cc' || echo '$(srcdir)/'`judger.cc 583 | 584 | wzoj_judger-judger.obj: judger.cc 585 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -MT wzoj_judger-judger.obj -MD -MP -MF $(DEPDIR)/wzoj_judger-judger.Tpo -c -o wzoj_judger-judger.obj `if test -f 'judger.cc'; then $(CYGPATH_W) 'judger.cc'; else $(CYGPATH_W) '$(srcdir)/judger.cc'; fi` 586 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wzoj_judger-judger.Tpo $(DEPDIR)/wzoj_judger-judger.Po 587 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='judger.cc' object='wzoj_judger-judger.obj' libtool=no @AMDEPBACKSLASH@ 588 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 589 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -c -o wzoj_judger-judger.obj `if test -f 'judger.cc'; then $(CYGPATH_W) 'judger.cc'; else $(CYGPATH_W) '$(srcdir)/judger.cc'; fi` 590 | 591 | wzoj_judger-sim.o: sim.cc 592 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -MT wzoj_judger-sim.o -MD -MP -MF $(DEPDIR)/wzoj_judger-sim.Tpo -c -o wzoj_judger-sim.o `test -f 'sim.cc' || echo '$(srcdir)/'`sim.cc 593 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wzoj_judger-sim.Tpo $(DEPDIR)/wzoj_judger-sim.Po 594 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sim.cc' object='wzoj_judger-sim.o' libtool=no @AMDEPBACKSLASH@ 595 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 596 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -c -o wzoj_judger-sim.o `test -f 'sim.cc' || echo '$(srcdir)/'`sim.cc 597 | 598 | wzoj_judger-sim.obj: sim.cc 599 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -MT wzoj_judger-sim.obj -MD -MP -MF $(DEPDIR)/wzoj_judger-sim.Tpo -c -o wzoj_judger-sim.obj `if test -f 'sim.cc'; then $(CYGPATH_W) 'sim.cc'; else $(CYGPATH_W) '$(srcdir)/sim.cc'; fi` 600 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wzoj_judger-sim.Tpo $(DEPDIR)/wzoj_judger-sim.Po 601 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sim.cc' object='wzoj_judger-sim.obj' libtool=no @AMDEPBACKSLASH@ 602 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 603 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -c -o wzoj_judger-sim.obj `if test -f 'sim.cc'; then $(CYGPATH_W) 'sim.cc'; else $(CYGPATH_W) '$(srcdir)/sim.cc'; fi` 604 | 605 | wzoj_judger-udp-listen.o: udp-listen.cc 606 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -MT wzoj_judger-udp-listen.o -MD -MP -MF $(DEPDIR)/wzoj_judger-udp-listen.Tpo -c -o wzoj_judger-udp-listen.o `test -f 'udp-listen.cc' || echo '$(srcdir)/'`udp-listen.cc 607 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wzoj_judger-udp-listen.Tpo $(DEPDIR)/wzoj_judger-udp-listen.Po 608 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='udp-listen.cc' object='wzoj_judger-udp-listen.o' libtool=no @AMDEPBACKSLASH@ 609 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 610 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -c -o wzoj_judger-udp-listen.o `test -f 'udp-listen.cc' || echo '$(srcdir)/'`udp-listen.cc 611 | 612 | wzoj_judger-udp-listen.obj: udp-listen.cc 613 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -MT wzoj_judger-udp-listen.obj -MD -MP -MF $(DEPDIR)/wzoj_judger-udp-listen.Tpo -c -o wzoj_judger-udp-listen.obj `if test -f 'udp-listen.cc'; then $(CYGPATH_W) 'udp-listen.cc'; else $(CYGPATH_W) '$(srcdir)/udp-listen.cc'; fi` 614 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/wzoj_judger-udp-listen.Tpo $(DEPDIR)/wzoj_judger-udp-listen.Po 615 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='udp-listen.cc' object='wzoj_judger-udp-listen.obj' libtool=no @AMDEPBACKSLASH@ 616 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 617 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(wzoj_judger_CXXFLAGS) $(CXXFLAGS) -c -o wzoj_judger-udp-listen.obj `if test -f 'udp-listen.cc'; then $(CYGPATH_W) 'udp-listen.cc'; else $(CYGPATH_W) '$(srcdir)/udp-listen.cc'; fi` 618 | 619 | .cpp.o: 620 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 621 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 622 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 623 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 624 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< 625 | 626 | .cpp.obj: 627 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` 628 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 629 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 630 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 631 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 632 | 633 | .cpp.lo: 634 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 635 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo 636 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ 637 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 638 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< 639 | 640 | mostlyclean-libtool: 641 | -rm -f *.lo 642 | 643 | clean-libtool: 644 | -rm -rf .libs _libs 645 | 646 | ID: $(am__tagged_files) 647 | $(am__define_uniq_tagged_files); mkid -fID $$unique 648 | tags: tags-am 649 | TAGS: tags 650 | 651 | tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 652 | set x; \ 653 | here=`pwd`; \ 654 | $(am__define_uniq_tagged_files); \ 655 | shift; \ 656 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ 657 | test -n "$$unique" || unique=$$empty_fix; \ 658 | if test $$# -gt 0; then \ 659 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 660 | "$$@" $$unique; \ 661 | else \ 662 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 663 | $$unique; \ 664 | fi; \ 665 | fi 666 | ctags: ctags-am 667 | 668 | CTAGS: ctags 669 | ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 670 | $(am__define_uniq_tagged_files); \ 671 | test -z "$(CTAGS_ARGS)$$unique" \ 672 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ 673 | $$unique 674 | 675 | GTAGS: 676 | here=`$(am__cd) $(top_builddir) && pwd` \ 677 | && $(am__cd) $(top_srcdir) \ 678 | && gtags -i $(GTAGS_ARGS) "$$here" 679 | cscopelist: cscopelist-am 680 | 681 | cscopelist-am: $(am__tagged_files) 682 | list='$(am__tagged_files)'; \ 683 | case "$(srcdir)" in \ 684 | [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ 685 | *) sdir=$(subdir)/$(srcdir) ;; \ 686 | esac; \ 687 | for i in $$list; do \ 688 | if test -f "$$i"; then \ 689 | echo "$(subdir)/$$i"; \ 690 | else \ 691 | echo "$$sdir/$$i"; \ 692 | fi; \ 693 | done >> $(top_builddir)/cscope.files 694 | 695 | distclean-tags: 696 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 697 | 698 | distdir: $(DISTFILES) 699 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 700 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 701 | list='$(DISTFILES)'; \ 702 | dist_files=`for file in $$list; do echo $$file; done | \ 703 | sed -e "s|^$$srcdirstrip/||;t" \ 704 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 705 | case $$dist_files in \ 706 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 707 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 708 | sort -u` ;; \ 709 | esac; \ 710 | for file in $$dist_files; do \ 711 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 712 | if test -d $$d/$$file; then \ 713 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 714 | if test -d "$(distdir)/$$file"; then \ 715 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 716 | fi; \ 717 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 718 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 719 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 720 | fi; \ 721 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 722 | else \ 723 | test -f "$(distdir)/$$file" \ 724 | || cp -p $$d/$$file "$(distdir)/$$file" \ 725 | || exit 1; \ 726 | fi; \ 727 | done 728 | check-am: all-am 729 | check: check-am 730 | all-am: Makefile $(PROGRAMS) 731 | installdirs: 732 | for dir in "$(DESTDIR)$(bindir)"; do \ 733 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 734 | done 735 | install: install-am 736 | install-exec: install-exec-am 737 | install-data: install-data-am 738 | uninstall: uninstall-am 739 | 740 | install-am: all-am 741 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 742 | 743 | installcheck: installcheck-am 744 | install-strip: 745 | if test -z '$(STRIP)'; then \ 746 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 747 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 748 | install; \ 749 | else \ 750 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 751 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 752 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ 753 | fi 754 | mostlyclean-generic: 755 | 756 | clean-generic: 757 | 758 | distclean-generic: 759 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 760 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 761 | 762 | maintainer-clean-generic: 763 | @echo "This command is intended for maintainers to use" 764 | @echo "it deletes files that may require special tools to rebuild." 765 | clean: clean-am 766 | 767 | clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am 768 | 769 | distclean: distclean-am 770 | -rm -rf ./$(DEPDIR) 771 | -rm -f Makefile 772 | distclean-am: clean-am distclean-compile distclean-generic \ 773 | distclean-tags 774 | 775 | dvi: dvi-am 776 | 777 | dvi-am: 778 | 779 | html: html-am 780 | 781 | html-am: 782 | 783 | info: info-am 784 | 785 | info-am: 786 | 787 | install-data-am: 788 | 789 | install-dvi: install-dvi-am 790 | 791 | install-dvi-am: 792 | 793 | install-exec-am: install-binPROGRAMS 794 | 795 | install-html: install-html-am 796 | 797 | install-html-am: 798 | 799 | install-info: install-info-am 800 | 801 | install-info-am: 802 | 803 | install-man: 804 | 805 | install-pdf: install-pdf-am 806 | 807 | install-pdf-am: 808 | 809 | install-ps: install-ps-am 810 | 811 | install-ps-am: 812 | 813 | installcheck-am: 814 | 815 | maintainer-clean: maintainer-clean-am 816 | -rm -rf ./$(DEPDIR) 817 | -rm -f Makefile 818 | maintainer-clean-am: distclean-am maintainer-clean-generic 819 | 820 | mostlyclean: mostlyclean-am 821 | 822 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ 823 | mostlyclean-libtool 824 | 825 | pdf: pdf-am 826 | 827 | pdf-am: 828 | 829 | ps: ps-am 830 | 831 | ps-am: 832 | 833 | uninstall-am: uninstall-binPROGRAMS 834 | 835 | .MAKE: install-am install-strip 836 | 837 | .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ 838 | clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ 839 | ctags ctags-am distclean distclean-compile distclean-generic \ 840 | distclean-libtool distclean-tags distdir dvi dvi-am html \ 841 | html-am info info-am install install-am install-binPROGRAMS \ 842 | install-data install-data-am install-dvi install-dvi-am \ 843 | install-exec install-exec-am install-html install-html-am \ 844 | install-info install-info-am install-man install-pdf \ 845 | install-pdf-am install-ps install-ps-am install-strip \ 846 | installcheck installcheck-am installdirs maintainer-clean \ 847 | maintainer-clean-generic mostlyclean mostlyclean-compile \ 848 | mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ 849 | tags tags-am uninstall uninstall-am uninstall-binPROGRAMS 850 | 851 | .PRECIOUS: Makefile 852 | 853 | 854 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 855 | # Otherwise a system limit (for SysV at least) may be exceeded. 856 | .NOEXPORT: 857 | --------------------------------------------------------------------------------