From 3494f77964c74bb84cb6049211705fa3e4de8a99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E5=86=AC=E7=94=9F?= Date: Mon, 18 Feb 2019 00:20:31 +0800 Subject: [PATCH] Add Makefile.docker --- .editorconfig | 3 +++ Makefile | 4 ++-- Makefile.docker | 25 +++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 Makefile.docker 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