mirror of
https://github.com/Soccera1/agg.git
synced 2026-02-04 04:03:40 +01:00
Add static linking for github releases
This commit is contained in:
parent
ce21da8661
commit
a01f7a6699
2 changed files with 5 additions and 3 deletions
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
|
@ -19,7 +19,7 @@ jobs:
|
||||||
run: sudo apt-get update && sudo apt-get install -y build-essential
|
run: sudo apt-get update && sudo apt-get install -y build-essential
|
||||||
|
|
||||||
- name: Build project for Linux
|
- name: Build project for Linux
|
||||||
run: make all
|
run: LDFLAGS="-static" make all
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
|
|
||||||
- name: Upload Linux artifact
|
- name: Upload Linux artifact
|
||||||
|
|
|
||||||
6
Makefile
6
Makefile
|
|
@ -1,6 +1,8 @@
|
||||||
# Compiler and flags
|
# Compiler and flags
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -Wall -Wextra -std=c99 -pedantic -O3 -flto
|
EXTRA_CFLAGS ?=
|
||||||
|
CFLAGS ?= -Wall -Wextra -std=c99 -pedantic -O3 -flto $(EXTRA_CFLAGS)
|
||||||
|
LDFLAGS ?=
|
||||||
DEBUG_FLAGS = -g -DDEBUG
|
DEBUG_FLAGS = -g -DDEBUG
|
||||||
|
|
||||||
# Directories
|
# Directories
|
||||||
|
|
@ -29,7 +31,7 @@ $(OBJDIR)/%.o: $(SRCDIR)/%.c | $(OBJDIR)
|
||||||
|
|
||||||
# Link executable
|
# Link executable
|
||||||
$(TARGET): $(OBJECTS) | $(BINDIR)
|
$(TARGET): $(OBJECTS) | $(BINDIR)
|
||||||
$(CC) $(OBJECTS) -o $@
|
$(CC) $(LDFLAGS) $(OBJECTS) -o $@
|
||||||
|
|
||||||
# Debug build
|
# Debug build
|
||||||
debug: CFLAGS += $(DEBUG_FLAGS)
|
debug: CFLAGS += $(DEBUG_FLAGS)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue