Skip to content

Commit

Permalink
Merge pull request #1390 from berryzplus/feature/add_ndebug_to_mydefi…
Browse files Browse the repository at this point in the history
…nes_if_missing

MYDEFINESに-DNDEBUGが指定されてない対策の改良
  • Loading branch information
berryzplus committed Sep 5, 2020
2 parents 2f0a862 + 0523902 commit e34c4aa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
7 changes: 7 additions & 0 deletions sakura_core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ DEFINES= \
-D_UNICODE \
-DUNICODE \
$(MYDEFINES)

ifeq (,$(findstring -D_DEBUG,$(DEFINES)))
ifeq (,$(findstring -DNDEBUG,$(DEFINES)))
DEFINES += -DNDEBUG
endif
endif

CFLAGS= \
-finput-charset=utf-8 \
-fexec-charset=cp932 \
Expand Down
13 changes: 7 additions & 6 deletions sakura_lang_en_US/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,19 @@ endif
CC= $(PREFIX)gcc
RC= $(RCPREFIX)windres

ifeq (-D_DEBUG,$(findstring -D_DEBUG,$(MYDEFINES)))
else ifeq (-DNDEBUG,$(findstring -DNDEBUG,$(MYDEFINES)))
else
MYDEFINES += -DNDEBUG
endif

DEFINES= \
-DWIN32 \
-D_WIN32_WINNT=_WIN32_WINNT_WIN7 \
-D_UNICODE \
-DUNICODE \
$(MYDEFINES)

ifeq (,$(findstring -D_DEBUG,$(DEFINES)))
ifeq (,$(findstring -DNDEBUG,$(DEFINES)))
DEFINES += -DNDEBUG
endif
endif

LDFLAGS= \
-static \
-shared \
Expand Down

0 comments on commit e34c4aa

Please sign in to comment.