Skip to content

Commit 23d9187

Browse files
committed
Allow to set CFLAGS from distribution, update libxputty
1 parent f591833 commit 23d9187

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ BLUE = "\033[1;34m"
55
RED = "\033[1;31m"
66
NONE = "\033[0m"
77

8+
DISTRO_CFLAGS = $(CFLAGS)
9+
810
SUBDIR := XUiDesigner
911

1012
.PHONY: $(SUBDIR) libxputty recurse
@@ -23,7 +25,7 @@ clean:
2325

2426
libxputty: check-and-reinit-submodules
2527
ifneq ($(MAKECMDGOALS),debug)
26-
@exec $(MAKE) --no-print-directory -j 1 -C $@ $(MAKECMDGOALS) CFLAGS='-O3 -D_FORTIFY_SOURCE=2 -Wall \
28+
@exec $(MAKE) --no-print-directory -j 1 -C $@ $(MAKECMDGOALS) CFLAGS='-O3 $(DISTRO_CFLAGS) -D_FORTIFY_SOURCE=2 -Wall \
2729
-fstack-protector -fno-ident -fno-asynchronous-unwind-tables -s -DNDEBUG -Wno-unused-result'
2830
else
2931
@exec $(MAKE) --no-print-directory -j 1 -C $@ $(MAKECMDGOALS)

XUiDesigner/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
MY_CFLAGS += -O3 $(CFLAGS) -D_FORTIFY_SOURCE=2 -Wall -Wextra -fstack-protector -fno-ident -Wno-unused-result \
4747
-fno-asynchronous-unwind-tables -s -DNDEBUG -DSHARE_DIR=\"$(SHARE_DIR)\"
4848
# -pedantic -Wextra -Wshadow -Wpadded -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
49-
DEBUG_MY_CFLAGS += -g -D DEBUG -DSHARE_DIR=\"$(SHARE_DIR)\"
49+
DEBUG_MY_CFLAGS += $(CFLAGS) -g -DDEBUG -DSHARE_DIR=\"$(SHARE_DIR)\"
5050
# invoke build files
5151
SOURCE = $(wildcard $(SOURCE_DIR)*.c)
5252
OBJECTS := $(addprefix $(BUILD_DIR),$(notdir $(patsubst %.c,%.o,$(SOURCE))))

0 commit comments

Comments
 (0)