mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
separate debug build; pass flags to linker so OS won't run in emulation mode
This commit is contained in:
parent
1dcee125b9
commit
3559618e25
1 changed files with 12 additions and 9 deletions
|
@ -32,6 +32,7 @@ STANDALONE = -DXWFEATURE_STANDALONE_ONLY
|
||||||
CFLAGS += -D_WIN32_WCE=400 -DUNDER_CE \
|
CFLAGS += -D_WIN32_WCE=400 -DUNDER_CE \
|
||||||
$(STANDALONE) \
|
$(STANDALONE) \
|
||||||
-fdollars-in-identifiers -D__W32API_USE_DLLIMPORT__
|
-fdollars-in-identifiers -D__W32API_USE_DLLIMPORT__
|
||||||
|
LFLAGS += -Wl,--major-subsystem-version,4,--minor-subsystem-version,20
|
||||||
ifdef HAVE_COMMCTRL
|
ifdef HAVE_COMMCTRL
|
||||||
CELIBS += -lcommctrl -laygshell
|
CELIBS += -lcommctrl -laygshell
|
||||||
else
|
else
|
||||||
|
@ -50,10 +51,12 @@ endif
|
||||||
|
|
||||||
CFLAGS += -DARM -I$(MINGW_INC_PATH) -I./ -I../common -I../relay
|
CFLAGS += -DARM -I$(MINGW_INC_PATH) -I./ -I../common -I../relay
|
||||||
|
|
||||||
DEBUG ?= -DDEBUG
|
ifdef DEBUG
|
||||||
# include timestamp in logs
|
CFLAGS += -g -DDEBUG_TS
|
||||||
DEBUG += -DDEBUG_TS
|
else
|
||||||
MEM_DEBUG ?= -DMEM_DEBUG
|
CFLAGS += -Os
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
OBJDIR = obj_$(TARGET_OS)
|
OBJDIR = obj_$(TARGET_OS)
|
||||||
TARGET = $(OBJDIR)/xwords4.exe
|
TARGET = $(OBJDIR)/xwords4.exe
|
||||||
|
@ -106,12 +109,12 @@ CFLAGS += $(XW_BOTH_DEFINES) -DARM
|
||||||
####################################################################
|
####################################################################
|
||||||
|
|
||||||
all : $(TARGET)
|
all : $(TARGET)
|
||||||
@echo "####################################################################"
|
|
||||||
@echo "# need to hexedit the three bytes starting at offset c8 to 0x040014 "
|
memdebug:
|
||||||
@echo "####################################################################"
|
$(MAKE) DEBUG=-DDEBUG MEM_DEBUG=-DMEM_DEBUG all
|
||||||
|
|
||||||
$(TARGET) : $(OBJS) $(RESOBJS)
|
$(TARGET) : $(OBJS) $(RESOBJS)
|
||||||
$(CC) $(CFLAGS) -mwindows $^ $(CELIBS) -o $@
|
$(CC) $(CFLAGS) $(LFLAGS) -mwindows $^ $(CELIBS) -o $@
|
||||||
|
|
||||||
$(OBJDIR)/%.o : %.c $(INCLUDES)
|
$(OBJDIR)/%.o : %.c $(INCLUDES)
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
|
@ -122,7 +125,7 @@ $(OBJDIR)/%.o : ../common/%.c $(INCLUDES)
|
||||||
$(CC) -c $(CFLAGS) -o $@ $<
|
$(CC) -c $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
$(OBJDIR)/xwords4.rc.o : xwords4.rc $(INCLUDES)
|
$(OBJDIR)/xwords4.rc.o : xwords4.rc $(INCLUDES)
|
||||||
$(WINDRES) -v -I$(MINGW_INC_PATH) \
|
$(WINDRES) -v -I$(MINGW_INC_PATH) $(DEBUG) $(MEM_DEBUG) \
|
||||||
-D_WIN32_WCE=400 -D_WIN32 -D_WIN32_IE=0x0400 \
|
-D_WIN32_WCE=400 -D_WIN32 -D_WIN32_IE=0x0400 \
|
||||||
$(STANDALONE) \
|
$(STANDALONE) \
|
||||||
-o $@ $<
|
-o $@ $<
|
||||||
|
|
Loading…
Reference in a new issue