Skip to content

Commit

Permalink
Allow to set CFLAGS from distribution, update libxputty
Browse files Browse the repository at this point in the history
  • Loading branch information
brummer10 committed Oct 9, 2024
1 parent f591833 commit 23d9187
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ BLUE = "\033[1;34m"
RED = "\033[1;31m"
NONE = "\033[0m"

DISTRO_CFLAGS = $(CFLAGS)

SUBDIR := XUiDesigner

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

libxputty: check-and-reinit-submodules
ifneq ($(MAKECMDGOALS),debug)
@exec $(MAKE) --no-print-directory -j 1 -C $@ $(MAKECMDGOALS) CFLAGS='-O3 -D_FORTIFY_SOURCE=2 -Wall \
@exec $(MAKE) --no-print-directory -j 1 -C $@ $(MAKECMDGOALS) CFLAGS='-O3 $(DISTRO_CFLAGS) -D_FORTIFY_SOURCE=2 -Wall \
-fstack-protector -fno-ident -fno-asynchronous-unwind-tables -s -DNDEBUG -Wno-unused-result'
else
@exec $(MAKE) --no-print-directory -j 1 -C $@ $(MAKECMDGOALS)
Expand Down
2 changes: 1 addition & 1 deletion XUiDesigner/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
MY_CFLAGS += -O3 $(CFLAGS) -D_FORTIFY_SOURCE=2 -Wall -Wextra -fstack-protector -fno-ident -Wno-unused-result \
-fno-asynchronous-unwind-tables -s -DNDEBUG -DSHARE_DIR=\"$(SHARE_DIR)\"
# -pedantic -Wextra -Wshadow -Wpadded -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
DEBUG_MY_CFLAGS += -g -D DEBUG -DSHARE_DIR=\"$(SHARE_DIR)\"
DEBUG_MY_CFLAGS += $(CFLAGS) -g -DDEBUG -DSHARE_DIR=\"$(SHARE_DIR)\"
# invoke build files
SOURCE = $(wildcard $(SOURCE_DIR)*.c)
OBJECTS := $(addprefix $(BUILD_DIR),$(notdir $(patsubst %.c,%.o,$(SOURCE))))
Expand Down
2 changes: 1 addition & 1 deletion libxputty

0 comments on commit 23d9187

Please sign in to comment.