Skip to content

Commit

Permalink
Add Makefile.docker
Browse files Browse the repository at this point in the history
  • Loading branch information
songdongsheng committed Feb 17, 2019
1 parent 1526b90 commit 3494f77
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ indent_size = 4

[Makefile]
indent_style = tab

[Makefile.docker]
indent_style = tab
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CFLAGS ?= -Os -Wall -Wextra -pedantic
CFLAGS ?= -Os -std=gnu99 -Wall -Wextra -pedantic
LDFLAGS ?=

PROG := su-exec
Expand All @@ -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
25 changes: 25 additions & 0 deletions Makefile.docker
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3494f77

Please sign in to comment.