Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.

Commit

Permalink
Rename backend binary to safeJudger
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed Feb 28, 2018
1 parent c314be9 commit 5577ebf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Backend/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This .gitignore is for this specific directory

.vscode
main
safeJudger
config.h
config.sh
5 changes: 3 additions & 2 deletions Backend/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static const struct option longOpts[] = {
{NULL, no_argument, NULL, 0}};

void display_title(void){
log("OJ sandbox backend (version " GITVERSION_STR ", commit " GITCOMMIT_STR ")\n\n");
log("OJ sandbox backend (version " GITVERSION_STR ", commit " GITCOMMIT_STR ", " __DATE__ " at " __TIME__ ")\n\n");
}

void display_help(const char *a0)
Expand Down Expand Up @@ -84,7 +84,8 @@ void display_help(const char *a0)
" executed program.\n"
" --mem-rss-only (Optional) Limit RSS (Resident Set Size) memory only, if\n"
" --mem-limit is on.\n"
" -h --help (Optional) This will show this message.\n",
"\n"
" -h --help Show this help message and quit.\n",
a0, a0);
exit(0);
}
Expand Down
12 changes: 7 additions & 5 deletions Backend/makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
.PHONY: all clean

all: main

CC := gcc
CFLAGS := -O3 -Wall -s
LDFLAGS := -lseccomp
OBJS = main.o secrules.o util.o

CONFIG = config.h
OBJS = main.o secrules.o util.o
BIN = safeJudger

CFG_TL_MARGIN ?= 50

main: $(CONFIG) $(OBJS)
all: $(BIN)

$(BIN): $(CONFIG) $(OBJS)
${CC} ${CFLAGS} -o $@ $^ ${LDFLAGS}

%.o: %.c
Expand All @@ -22,4 +24,4 @@ config.h:
echo "#define TL_MARGIN $(CFG_TL_MARGIN)" >> $@

clean:
rm -f main $(OBJS) $(CONFIG)
rm -f $(BIN) $(OBJS) $(CONFIG)
2 changes: 1 addition & 1 deletion file.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
runDir = None
resourceDir = os.getcwd() + '/Backend/'
initExe = resourceDir + 'init.sh'
backendExe = resourceDir + 'main'
backendExe = resourceDir + 'safeJudger'
inFileName = 'in.tmp'
outFileName = 'out.tmp'

Expand Down

0 comments on commit 5577ebf

Please sign in to comment.