mirror of
https://github.com/HerrCraziDev/tiny-kyoukai.git
synced 2026-04-20 15:24:22 +02:00
Static compilation wip
This commit is contained in:
14
Makefile
14
Makefile
@@ -11,9 +11,17 @@ HEADER_DIR = $(SOURCE_DIR)/includes
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -std=c11 -g
|
CFLAGS = -std=c11 -g
|
||||||
LDFLAGS = -g
|
LDFLAGS = -g
|
||||||
LIBS = gtk4 x11 gtk4-x11
|
LIBS = x11 gtk4 gtk4-x11
|
||||||
LDLIBS = $(shell if [ -n "$(LIBS)" ]; then pkg-config -libs $(LIBS); fi)
|
STATIC_LIBS =
|
||||||
INCLUDES = $(shell if [ -n "$(LIBS)" ]; then pkg-config -cflags $(LIBS); fi) -I$(HEADER_DIR)
|
INCLUDES = -I$(HEADER_DIR)
|
||||||
|
ifdef LIBS
|
||||||
|
LDLIBS = $(shell pkg-config -libs $(LIBS))
|
||||||
|
INCLUDES += $(shell pkg-config -cflags $(LIBS))
|
||||||
|
endif
|
||||||
|
ifdef STATIC_LIBS
|
||||||
|
LDLIBS += -Wl,-Bstatic $(shell pkg-config -libs $(STATIC_LIBS)) -Wl,-Bdynamic
|
||||||
|
INCLUDES += $(shell pkg-config -cflags $(STATIC_LIBS))
|
||||||
|
endif
|
||||||
|
|
||||||
SRC = $(shell find $(SOURCE_DIR)/ -type f -name '*.c') main.c
|
SRC = $(shell find $(SOURCE_DIR)/ -type f -name '*.c') main.c
|
||||||
NOM = $(basename $(notdir $(SRC)))
|
NOM = $(basename $(notdir $(SRC)))
|
||||||
|
|||||||
Reference in New Issue
Block a user