Os Makefiles das libraries não passavam -O: tudo menos o core (editor, operators, number, variables, vector, graphics...) saía em -O0, inclusive no AppImage. Agora todas usam -O2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 lines
597 B
Makefile
29 lines
597 B
Makefile
# Makefile da library bmp (categoria "BMP")
|
|
CC := gcc
|
|
BUILD := build
|
|
|
|
CFLAGS := -std=c11 -O2 -Wall -Wextra -pedantic -fvisibility=hidden \
|
|
-D_POSIX_C_SOURCE=200809L -I../../include -Iinclude
|
|
|
|
OBJ := $(BUILD)/tb_bmp.o
|
|
LIB_A := $(BUILD)/libtinyblocks-bmp.a
|
|
LIB_SO := $(BUILD)/libtinyblocks-bmp.so
|
|
|
|
.PHONY: all static shared clean
|
|
all: static shared
|
|
static: $(LIB_A)
|
|
shared: $(LIB_SO)
|
|
|
|
$(OBJ): src/tb_bmp.c include/tb_bmp.h
|
|
@mkdir -p $(BUILD)
|
|
$(CC) $(CFLAGS) -fPIC -c $< -o $@
|
|
|
|
$(LIB_A): $(OBJ)
|
|
ar rcs $@ $^
|
|
|
|
$(LIB_SO): $(OBJ)
|
|
$(CC) -shared -o $@ $^
|
|
|
|
clean:
|
|
$(RM) -r $(BUILD)
|