This commit is contained in:
Your Name 2025-09-23 06:53:20 +00:00
parent 99b4fe9808
commit 885fe574da
3 changed files with 12 additions and 6 deletions

View File

@ -24,13 +24,19 @@ ALPINE := alpine/
ALPINE_BIN := $(ALPINE)/bin
ALPINE_IMG := $(ASSETS)/alpine.img
ALPINE_TAR := $(ALPINE_IMG).gz
ALPINE_HEADLESS := $(ASSETS)/headless.apkovl.tar.gz
all: $(SRC) $(BUILD_DIR) $(LIB) get
$(CC) $(CFLAGS) -o $(TARGET) -static $(SRC) $(LIB)
get: $(ALPINE) $(ASSETS)
wget https://dl-cdn.alpinelinux.org/alpine/v3.22/releases/aarch64/alpine-rpi-3.22.1-aarch64.tar.gz -O $(ALPINE_TAR)
wget https://github.com/macmpi/alpine-linux-headless-bootstrap/raw/98728731299f262eab270941c522138d6c5cea73/headless.apkovl.tar.gz -O $(ALPINE_HEADLESS)
rm -rf $(ALPINE)/*
tar xvf $(ALPINE_TAR) -C $(ALPINE)
all: build copy
docker: build copy $(TARGET)
$(SRC) $(BUILD_DIR) $(LIB) get
$(CC) $(CFLAGS) -o $(TARGET) -static $(SRC) $(LIB)
cp $(TARGET) $(ALPINE_BIN)
@ -38,9 +44,6 @@ all: build copy
docker import --platform linux/arm64 $(MINIROOTFS) alpine-custom:latest
build: $(SRC) $(BUILD_DIR) $(LIB) get
$(CC) $(CFLAGS) -o $(TARGET) -static $(SRC) $(LIB)
copy: build
cp $(TARGET) $(ALPINE_BIN)
tar czf $(MINIROOTFS) -C alpine ./
@ -63,3 +66,6 @@ $(ASSETS):
clean:
rm -rf $(BUILD_DIR) $(ALPINE) $(ASSETS)
make fclean -C $(LIBFT_DIR)
.PHONY: all build copy run clean

Binary file not shown.

View File

@ -47,8 +47,8 @@ LIBS := printf
all: $(NAME)
arch-armhf: CFLAGS += --target=arm-linux-gnueabihf -static
arch-armhf: fclean all
aarch64: CFLAGS += --target=arm-linux-gnueabihf -static
aarch64 : fclean all
bonus: $(OBJBON) $(OBJ)
ar rcs libft.a $(OBJ) $(OBJBON)