blob: 27cf3f6328f47b660e079866090c1956e4209947 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
CFLAGS ?= -std=c11 -g -O3 -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -fPIE -fstack-protector-all \
-Wall -Wextra -Wpedantic -Wshadow -Wmissing-declarations -Wpointer-arith -Wunused-macros
LDFLAGS ?= -pie -Wl,-z,relro,-z,now -lseccomp -lsystemd -ljansson
OBJS := main.o playground.o seccomp.o systemd.o
DEPS := config.h
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
sandbox: $(OBJS)
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
install: sandbox
install -m 6755 -o root sandbox runner
clean:
$(RM) runner sandbox
$(RM) *.o
|