summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-12-05 13:05:08 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-12-05 13:05:08 (GMT)
commit9880b91da54231f91d6f22983945c385ccfab129 (patch)
tree06802b15229a3e7c30ed5641aba7b96df15b2692 /win
parentc866b69aaca5708edbb15d8a51b9346e2d77a740 (diff)
downloadtk-9880b91da54231f91d6f22983945c385ccfab129.zip
tk-9880b91da54231f91d6f22983945c385ccfab129.tar.gz
tk-9880b91da54231f91d6f22983945c385ccfab129.tar.bz2
Build without -DUNICDE -D_UNICODE, since it's not necessary any-more (all code uses implicit *W-API now). This also eliminates the need for the TK_ASCII_MAIN hack.
Diffstat (limited to 'win')
-rw-r--r--win/Makefile.in11
-rw-r--r--win/makefile.vc10
2 files changed, 11 insertions, 10 deletions
diff --git a/win/Makefile.in b/win/Makefile.in
index 59074aa..fe114cd 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -168,7 +168,7 @@ LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
#CFLAGS = $(CFLAGS_DEBUG)
#CFLAGS = $(CFLAGS_OPTIMIZE)
#CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
-CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -DUNICODE -D_UNICODE -D_ATL_XP_TARGETING
+CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -D_ATL_XP_TARGETING
# Special compiler flags to use when building man2tcl on Windows.
MAN2TCLFLAGS = @MAN2TCLFLAGS@
@@ -630,7 +630,7 @@ ${TEST_DLL_FILE}: ${TKTEST_OBJS} ${TK_STUB_LIB_FILE}
$(TCL_SRC_DIR)/win/cat.c:
cat32.${OBJEXT}: $(TCL_SRC_DIR)/win/cat.c
- $(CC) -c $(CC_SWITCHES) "$(TCL_SRC_DIR)/win/cat.c" $(CC_OBJNAME)
+ $(CC) -c $(CC_SWITCHES) -DUNICODE -D_UNICODE "$(TCL_SRC_DIR)/win/cat.c" $(CC_OBJNAME)
$(CAT32): cat32.${OBJEXT}
$(CC) $(CFLAGS) cat32.$(OBJEXT) $(CC_EXENAME) $(LIBS) $(LDFLAGS_CONSOLE)
@@ -656,10 +656,10 @@ ${TK_LIB_FILE}: ${TK_OBJS}
# Special case object file targets
winMain.$(OBJEXT): winMain.c
- $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME)
+ $(CC) -c $(CC_SWITCHES) -DUNICODE=1 -D_UNICODE=1 @DEPARG@ $(CC_OBJNAME)
testMain.$(OBJEXT): winMain.c
- $(CC) -c $(CC_SWITCHES) @DEPARG@ -DTK_TEST $(CC_OBJNAME)
+ $(CC) -c $(CC_SWITCHES) -DTK_TEST -DUNICODE=1 -D_UNICODE=1 @DEPARG@ $(CC_OBJNAME)
tkTest.$(OBJEXT): tkTest.c
$(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME)
@@ -674,11 +674,12 @@ tkSquare.$(OBJEXT): tkSquare.c
$(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME)
tkMain2.$(OBJEXT): tkMain.c
- $(CC) -c $(CC_SWITCHES) -DBUILD_tk -DTK_ASCII_MAIN @DEPARG@ $(CC_OBJNAME)
+ $(CC) -c $(CC_SWITCHES) -DBUILD_tk -DUNICODE=1 -D_UNICODE=1 @DEPARG@ $(CC_OBJNAME)
# Extra dependency info
tkConsole.$(OBJEXT): configure Makefile
tkMain.$(OBJEXT): configure Makefile
+tkMain2.$(OBJEXT): configure Makefile
tkWindow.$(OBJEXT): configure Makefile
# Add the object extension to the implicit rules. By default .obj is not
diff --git a/win/makefile.vc b/win/makefile.vc
index 6371f0f..a10ee60 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -307,7 +307,7 @@ PRJ_INCLUDES = -I"$(BITMAPDIR)" -I"$(XLIBDIR)"
CONFIG_DEFS =/DSTDC_HEADERS=1 /DHAVE_SYS_TYPES_H=1 /DHAVE_SYS_STAT_H=1 \
/DHAVE_STDLIB_H=1 /DHAVE_STRING_H=1 /DHAVE_MEMORY_H=1 \
/DHAVE_STRINGS_H=1 /DHAVE_INTTYPES_H=1 \
- /DSUPPORT_CONFIG_EMBEDDED /DUNICODE /D_UNICODE \
+ /DSUPPORT_CONFIG_EMBEDDED \
!if $(HAVE_UXTHEME_H)
/DHAVE_UXTHEME_H=1 \
!endif
@@ -455,7 +455,7 @@ $(TKTEST): $(TKTESTOBJS) $(TKSTUBLIB) $(TKIMPLIB)
$(CAT32): $(_TCLDIR)\win\cat.c
- $(cc32) $(cflags) $(crt) /D_CRT_NONSTDC_NO_DEPRECATE /DCONSOLE -Fo$(TMP_DIR)\ $?
+ $(cc32) $(cflags) $(crt) /D_CRT_NONSTDC_NO_DEPRECATE /DCONSOLE /DUNICODE /D_UNICODE -Fo$(TMP_DIR)\ $?
$(CONEXECMD) /DCONSOLE -stack:16384 $(TMP_DIR)\cat.obj
$(_VC_MANIFEST_EMBED_EXE)
@@ -531,7 +531,7 @@ install-pdbs:
#---------------------------------------------------------------------
$(TMP_DIR)\testMain.obj: $(WIN_DIR)\winMain.c
- $(cc32) $(appcflags_nostubs) /DTK_TEST \
+ $(cc32) $(appcflags_nostubs) /DTK_TEST /DUNICODE /D_UNICODE \
/DTCL_USE_STATIC_PACKAGES=$(TCL_USE_STATIC_PACKAGES) \
-Fo$@ $?
@@ -548,12 +548,12 @@ $(TMP_DIR)\tkSquare.obj: $(GENERICDIR)\tkSquare.c
$(cc32) $(appcflags_nostubs) -Fo$@ $?
$(TMP_DIR)\winMain.obj: $(WIN_DIR)\winMain.c
- $(cc32) $(appcflags_nostubs) \
+ $(cc32) $(appcflags_nostubs) /DUNICODE /D_UNICODE \
/DTCL_USE_STATIC_PACKAGES=$(TCL_USE_STATIC_PACKAGES) \
-Fo$@ $?
$(TMP_DIR)\tkMain2.obj: $(GENERICDIR)\tkMain.c
- $(cc32) $(pkgcflags) /DTK_ASCII_MAIN -Fo$@ $?
+ $(cc32) $(pkgcflags) /DUNICODE /D_UNICODE -Fo$@ $?
# The following objects are part of the stub library and should not
# be built as DLL objects but none of the symbols should be exported