diff --git a/.editorconfig b/.editorconfig index ab82ea8..ebaa33e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,3 +12,6 @@ indent_size = 4 [Makefile] indent_style = tab + +[Makefile.docker] +indent_style = tab diff --git a/Makefile b/Makefile index a3e1988..df99096 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CFLAGS ?= -Os -Wall -Wextra -pedantic +CFLAGS ?= -Os -std=gnu99 -Wall -Wextra -pedantic LDFLAGS ?= PROG := su-exec @@ -12,7 +12,7 @@ $(PROG)-shared: $(SRCS) $(PROG)-static: $(SRCS) $(CC) $(CFLAGS) -s -o $@ $^ $(LDFLAGS) -static - /bin/cp $(PROG)-static $(PROG) + # /bin/cp $(PROG)-static $(PROG) clean: rm -f $(PROG) $(PROG)-shared $(PROG)-static diff --git a/Makefile.docker b/Makefile.docker new file mode 100644 index 0000000..a5d65a4 --- /dev/null +++ b/Makefile.docker @@ -0,0 +1,25 @@ +all: su-exec-musl-shared \ + su-exec-musl-static \ + su-exec-glibc-shared \ + su-exec-glibc-static \ + su-exec-glibc-shared-arm64 \ + su-exec-glibc-static-arm64 \ + su-exec-glibc-shared-riscv64 \ + su-exec-glibc-static-riscv64 \ + su-exec-glibc-shared-s390x \ + su-exec-glibc-static-s390x + +su-exec-musl-shared su-exec-musl-static: su-exec.c vendor/docker-build-linux-amd64-musl.sh + vendor/docker-build-linux-amd64-musl.sh + +su-exec-glibc-shared su-exec-glibc-static: su-exec.c vendor/docker-build-linux-amd64-glibc.sh + vendor/docker-build-linux-amd64-glibc.sh + +su-exec-glibc-shared-arm64 su-exec-glibc-static-arm64: su-exec.c vendor/cross-build-linux-aarch64-glibc.sh + vendor/cross-build-linux-aarch64-glibc.sh + +su-exec-glibc-shared-riscv64 su-exec-glibc-static-riscv64: su-exec.c vendor/cross-build-linux-riscv64-glibc.sh + vendor/cross-build-linux-riscv64-glibc.sh + +su-exec-glibc-shared-s390x su-exec-glibc-static-s390x: su-exec.c vendor/cross-build-linux-s390x-glibc.sh + vendor/cross-build-linux-s390x-glibc.sh \ No newline at end of file