OSDN Git Service

Concerning compilaton with vcc or bcc in Msys or cygwin environment.
authorKeishi Suenaga <s_keishi@mutt.freemail.ne.jp>
Sun, 23 May 2004 11:59:10 +0000 (11:59 +0000)
committerKeishi Suenaga <s_keishi@mutt.freemail.ne.jp>
Sun, 23 May 2004 11:59:10 +0000 (11:59 +0000)
Medited Files:
   configure.in interface/Makefile.am timidity/timidity.c
Modified Files:
   config.h.in configure configure.in interface/Makefile.am
   interface/Makefile.in timidity/timidity.c

config.h.in
configure
configure.in
interface/Makefile.am
interface/Makefile.in
timidity/timidity.c

index ce89f4c..a482f48 100644 (file)
@@ -1,8 +1,5 @@
 /* config.h.in.  Generated from configure.in by autoheader.  */
 
-/* Windows GUI(not Mingw) */
-#undef ANOTHER_MAIN
-
 /* Define to 1 if you are in debug mode */
 #undef DEBUG
 
index 64788f0..5054ed4 100755 (executable)
--- a/configure
+++ b/configure
 
   if test "x$VCPP" = xyes || test "x$BORLANDC" = xyes; then
     INTERFACE_SRCS="$INTERFACE_SRCS w32g_ini.c w32g_pref.c w32g_syn.c w32g_utl.c winsyn_c.c rtsyn_common.c rtsyn_winmm.c"
-
-cat >>confdefs.h <<\_ACEOF
-#define ANOTHER_MAIN 1
-_ACEOF
-
     lib_w32gui_opt='gdi32.lib comctl32.lib comdlg32.lib ole32.lib'
     lib_user32_opt='user32.lib'
     if test "x$VCPP" = xyes; then
 
   if test "x$VCPP" = xyes || test "x$BORLANDC" = xyes; then
        INTERFACE_SRCS="$INTERFACE_SRCS w32g_c.c w32g_ini.c w32g_i.c w32g_playlist.c w32g_utl.c w32g_pref.c w32g_subwin.c w32g_subwin2.c w32g_subwin3.c w32g_ut2.c w32g_dib.c  wrdt_w32g.c w32g_mag.c"
-
-cat >>confdefs.h <<\_ACEOF
-#define ANOTHER_MAIN 1
-_ACEOF
-
     lib_w32gui_opt='gdi32.lib comctl32.lib comdlg32.lib ole32.lib'
     lib_user32_opt='user32.lib'
     if test "x$VCPP" = xyes; then
index df98631..85f2eb4 100644 (file)
@@ -1722,7 +1722,6 @@ CONFIG_INTERFACE(winsyng,W32G_SYN,W,
   [ 
   if test "x$VCPP" = xyes || test "x$BORLANDC" = xyes; then
     INTERFACE_SRCS="$INTERFACE_SRCS w32g_ini.c w32g_pref.c w32g_syn.c w32g_utl.c winsyn_c.c rtsyn_common.c rtsyn_winmm.c"
-    AC_DEFINE(ANOTHER_MAIN,1, Windows GUI(not Mingw))
     lib_w32gui_opt='gdi32.lib comctl32.lib comdlg32.lib ole32.lib'
     lib_user32_opt='user32.lib'
     if test "x$VCPP" = xyes; then
@@ -1749,7 +1748,6 @@ CONFIG_INTERFACE(w32gui, W32GUI, w,
   [ 
   if test "x$VCPP" = xyes || test "x$BORLANDC" = xyes; then
        INTERFACE_SRCS="$INTERFACE_SRCS w32g_c.c w32g_ini.c w32g_i.c w32g_playlist.c w32g_utl.c w32g_pref.c w32g_subwin.c w32g_subwin2.c w32g_subwin3.c w32g_ut2.c w32g_dib.c  wrdt_w32g.c w32g_mag.c"
-       AC_DEFINE(ANOTHER_MAIN,1, Windows GUI(not Mingw))   
     lib_w32gui_opt='gdi32.lib comctl32.lib comdlg32.lib ole32.lib'
     lib_user32_opt='user32.lib'
     if test "x$VCPP" = xyes; then
index c04c381..e0471b2 100644 (file)
@@ -287,7 +287,14 @@ w32g_res.res: w32g_res.h w32g_rec.h w32g_res.rc \
        w32g_btn.bmp w32g_icon.ico w32g_sleep.bmp w32g_subbtn.bmp 
        rc w32g_res.rc
 else
-
+if BORLANDC
+w32g_res.res: w32g_res.h w32g_rec.h w32g_res.rc \
+       w32g_btn.bmp w32g_icon.ico w32g_sleep.bmp w32g_subbtn.bmp
+       perl -pe 's/(^FONT.*".*").*$$/$$1/' w32g_res.rc >w32g_res_bc.rc
+       brcc32 -ic:/borland/bcc55/include w32g_res_bc.rc
+       mv w32g_res_bc.RES w32g_res.res
+       rm w32g_res_bc.rc
+else
 w32g_syn_escaped.c:w32g_syn.c escape_sjis.pl
        escape_sjis.pl < w32g_syn.c > w32g_syn_escaped.c
 
@@ -298,19 +305,21 @@ w32g_res.res: w32g_res.h w32g_rec.h w32g_res.rc \
        w32g_btn.bmp w32g_icon.ico w32g_sleep.bmp w32g_subbtn.bmp \
        escape_sjis.pl
        escape_sjis.pl <w32g_res.rc >w32g_res_escaped.rc
-if BORLANDC 
-       windres -o $@ -O res w32g_res_escaped.rc
-else
        windres -o $@ -O coff w32g_res_escaped.rc
-endif
        rm w32g_res_escaped.rc
 endif
+endif
 
-## BORLANC brcc32 can't usr TiMidity++ resource
-#if BORLANDC 
+## This is another way to build japanese resource for mingw.
+#BRCC32 = c:/borland/bcc55/bin/brcc32.exe
+#BRCC32_FLAGS = -ic:/borland/bcc55/include
 #w32g_res.res: w32g_res.h w32g_rec.h w32g_res.rc \
 #      w32g_btn.bmp w32g_icon.ico w32g_sleep.bmp w32g_subbtn.bmp
-#      brcc32 w32g_res.rc
+#      perl -pe 's/(^FONT.*".*").*$$/$$1/' w32g_res.rc >w32g_res_bc.rc
+#      $(BRCC32) $(BRCC32_FLAGS) w32g_res_bc.rc
+#      windres -o tmp.res -O coff w32g_res_bc.RES
+#      mv tmp.res w32g_res.res
+#      rm w32g_res_bc.RES
 
 if NEEDDLOPEN
 # dynamic_targets = @dynamic_targets@ # autoconf already define this
@@ -387,4 +396,14 @@ clean-compile:
        -rm -f *.RES
 
 install-exec-local: $(install_tk) $(install_xaw) $(install_el) $(install_dynamics)
+
+
+clean:
+       rm -f *.$(OBJEXT)
+       rm -f *.$(so)
+       rm -f *.a
+       rm -f *.lib     
+       rm -f *.res
+       rm -f *.RES
+
 ########## End of Makefile
index bd7b693..911d449 100644 (file)
@@ -505,10 +505,15 @@ EXTRA_DIST = \
 # ELFILES = @ELFILES@ # autoconf already define this
 @ENABLE_EMACS_TRUE@install_el = install.el
 
-#if BORLANDC 
+#BRCC32 = c:/borland/bcc55/bin/brcc32.exe
+#BRCC32_FLAGS = -ic:/borland/bcc55/include
 #w32g_res.res: w32g_res.h w32g_rec.h w32g_res.rc \
 #      w32g_btn.bmp w32g_icon.ico w32g_sleep.bmp w32g_subbtn.bmp
-#      brcc32 w32g_res.rc
+#      perl -pe 's/(^FONT.*".*").*$$/$$1/' w32g_res.rc >w32g_res_bc.rc
+#      $(BRCC32) $(BRCC32_FLAGS) w32g_res_bc.rc
+#      windres -o tmp.res -O coff w32g_res_bc.RES
+#      mv tmp.res w32g_res.res
+#      rm w32g_res_bc.RES
 
 # dynamic_targets = @dynamic_targets@ # autoconf already define this
 @NEEDDLOPEN_TRUE@install_dynamics = install.dynamics
@@ -1370,20 +1375,24 @@ install.el: $(ELFILES)
 @VCPP_TRUE@w32g_res.res: w32g_res.h w32g_rec.h w32g_res.rc \
 @VCPP_TRUE@    w32g_btn.bmp w32g_icon.ico w32g_sleep.bmp w32g_subbtn.bmp 
 @VCPP_TRUE@    rc w32g_res.rc
-
-@VCPP_FALSE@w32g_syn_escaped.c:w32g_syn.c escape_sjis.pl
-@VCPP_FALSE@   escape_sjis.pl < w32g_syn.c > w32g_syn_escaped.c
-
-@VCPP_FALSE@w32g_subwin_escaped.c:w32g_subwin.c escape_sjis.pl
-@VCPP_FALSE@   escape_sjis.pl < w32g_subwin.c > w32g_subwin_escaped.c
-
-@VCPP_FALSE@w32g_res.res: w32g_res.h w32g_rec.h w32g_res.rc \
-@VCPP_FALSE@   w32g_btn.bmp w32g_icon.ico w32g_sleep.bmp w32g_subbtn.bmp \
-@VCPP_FALSE@   escape_sjis.pl
-@VCPP_FALSE@   escape_sjis.pl <w32g_res.rc >w32g_res_escaped.rc
-@BORLANDC_TRUE@@VCPP_FALSE@    windres -o $@ -O res w32g_res_escaped.rc
+@BORLANDC_TRUE@@VCPP_FALSE@w32g_res.res: w32g_res.h w32g_rec.h w32g_res.rc \
+@BORLANDC_TRUE@@VCPP_FALSE@    w32g_btn.bmp w32g_icon.ico w32g_sleep.bmp w32g_subbtn.bmp
+@BORLANDC_TRUE@@VCPP_FALSE@    perl -pe 's/(^FONT.*".*").*$$/$$1/' w32g_res.rc >w32g_res_bc.rc
+@BORLANDC_TRUE@@VCPP_FALSE@    brcc32 -ic:/borland/bcc55/include w32g_res_bc.rc
+@BORLANDC_TRUE@@VCPP_FALSE@    mv w32g_res_bc.RES w32g_res.res
+@BORLANDC_TRUE@@VCPP_FALSE@    rm w32g_res_bc.rc
+@BORLANDC_FALSE@@VCPP_FALSE@w32g_syn_escaped.c:w32g_syn.c escape_sjis.pl
+@BORLANDC_FALSE@@VCPP_FALSE@   escape_sjis.pl < w32g_syn.c > w32g_syn_escaped.c
+
+@BORLANDC_FALSE@@VCPP_FALSE@w32g_subwin_escaped.c:w32g_subwin.c escape_sjis.pl
+@BORLANDC_FALSE@@VCPP_FALSE@   escape_sjis.pl < w32g_subwin.c > w32g_subwin_escaped.c
+
+@BORLANDC_FALSE@@VCPP_FALSE@w32g_res.res: w32g_res.h w32g_rec.h w32g_res.rc \
+@BORLANDC_FALSE@@VCPP_FALSE@   w32g_btn.bmp w32g_icon.ico w32g_sleep.bmp w32g_subbtn.bmp \
+@BORLANDC_FALSE@@VCPP_FALSE@   escape_sjis.pl
+@BORLANDC_FALSE@@VCPP_FALSE@   escape_sjis.pl <w32g_res.rc >w32g_res_escaped.rc
 @BORLANDC_FALSE@@VCPP_FALSE@   windres -o $@ -O coff w32g_res_escaped.rc
-@VCPP_FALSE@   rm w32g_res_escaped.rc
+@BORLANDC_FALSE@@VCPP_FALSE@   rm w32g_res_escaped.rc
 #n_so_libs = @n_so_libs@
 #s_so_libs = @s_so_libs@
 #m_so_libs = @m_so_libs@
@@ -1454,6 +1463,15 @@ clean-compile:
        -rm -f *.RES
 
 install-exec-local: $(install_tk) $(install_xaw) $(install_el) $(install_dynamics)
+
+clean:
+       rm -f *.$(OBJEXT)
+       rm -f *.$(so)
+       rm -f *.a
+       rm -f *.lib     
+       rm -f *.res
+       rm -f *.RES
+
 ########## End of Makefile
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 72ee3ba..4dffcfe 100644 (file)
@@ -5439,7 +5439,7 @@ extern int volatile save_playlist_once_before_exit_flag;
 static int CoInitializeOK = 0;
 #endif
 
-#ifndef ANOTHER_MAIN
+#if !defined ANOTHER_MAIN || defined(__W32__)
 #ifdef __W32__ /* Windows */
 #if ( (!defined(IA_W32GUI) || defined(__CYGWIN32__) || defined(__MINGW32__)) && !defined(IA_W32G_SYN) )
 /* Cygwin or Console */