]> granicus.if.org Git - nethack/commitdiff
Mac port prefix files
authorkmhugo <kmhugo>
Tue, 26 Aug 2003 00:19:58 +0000 (00:19 +0000)
committerkmhugo <kmhugo>
Tue, 26 Aug 2003 00:19:58 +0000 (00:19 +0000)
Support compilation of multiple flavors for the Macintosh:
1.  A Carbon port, text only and backwards-compatible with
    older versions of the MacOS.
2.  A termcap/Unix port for MacOS X only.
3.  A Qt port, tiled and MacOS X only.

The flavor can be selected at compile-time by specifying the
appropriate prefix file for the compiler.

Files
include/mac-carbon.h [new file with mode: 0644]
include/mac-qt.h [new file with mode: 0644]
include/mac-term.h [new file with mode: 0644]

diff --git a/Files b/Files
index efc999158e822e04896ee9148652829ebf660c7a..3019334d8ff62e75a79cba6d898aade595c290e5 100644 (file)
--- a/Files
+++ b/Files
@@ -35,16 +35,15 @@ beconf.h        color.h         config.h        config1.h       coord.h
 decl.h          def_os2.h       dgn_file.h      display.h       dlb.h
 dungeon.h       edog.h          emin.h          engrave.h       epri.h
 eshk.h          extern.h        flag.h          func_tab.h      global.h
-hack.h          lev.h           macconf.h       macpopup.h      macwin.h
-mail.h          mfndpos.h       micro.h         mkroom.h        monattk.h
-mondata.h       monflag.h       monst.h         monsym.h        nhlan.h
-ntconf.h        obj.h           objclass.h      os2conf.h       patchlevel.h
-pcconf.h        permonst.h      prop.h          qtext.h         quest.h
-rect.h          region.h        rm.h            skills.h        sp_lev.h
-spell.h         system.h        tcap.h          timeout.h       tosconf.h
-tradstdc.h      trampoli.h      trap.h          unixconf.h      vault.h
-vision.h        vmsconf.h       wceconf.h       winami.h        winprocs.h
-wintype.h       you.h           youprop.h
+hack.h          lev.h           mail.h          mfndpos.h       micro.h
+mkroom.h        monattk.h       mondata.h       monflag.h       monst.h
+monsym.h        nhlan.h         ntconf.h        obj.h           objclass.h
+os2conf.h       patchlevel.h    pcconf.h        permonst.h      prop.h
+qtext.h         quest.h         rect.h          region.h        rm.h
+skills.h        sp_lev.h        spell.h         system.h        tcap.h
+timeout.h       tosconf.h       tradstdc.h      trampoli.h      trap.h
+unixconf.h      vault.h         vision.h        vmsconf.h       wceconf.h
+winami.h        winprocs.h      wintype.h       you.h           youprop.h
 (file for tty versions)
 wintty.h
 (files for X versions)
@@ -55,8 +54,9 @@ qt_clust.h      qt_kde0.h       qt_win.h        qt_xpms.h       qttableview.h
 bitmfile.h      gem_rsc.h       load_img.h      wingem.h
 (file for GNOME versions)
 winGnome.h
-(files for mactty version)
-mactty.h        mttypriv.h
+(files for various Macintosh versions)
+mac-carbon.h    mac-qt.h        mac-term.h      macconf.h       macpopup.h
+mactty.h        macwin.h        mttypriv.h
 
 src:
 (files for all versions)
diff --git a/include/mac-carbon.h b/include/mac-carbon.h
new file mode 100644 (file)
index 0000000..9be633a
--- /dev/null
@@ -0,0 +1,32 @@
+/*     SCCS Id: @(#)mac-carbon.h       3.4     2003/06/01      */
+/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 2003. */
+/* NetHack may be freely redistributed.  See license for details. */
+
+/*     Compiler prefix file for the Macintosh Carbon port.
+ *
+ *     IMPORTANT: This file is intended only as a compiler prefix
+ *     file and must NEVER be included by other source (.c or .h)
+ *     files.
+ *
+ *     Usage for MacOS X Project Builder:
+ *             Project menu -> Edit Active Target '_target_' ->
+ *             target settings dialog -> Settings -> Simple View ->
+ *             GCC Compiler Settings ->
+ *             set "Prefix Header" to include/mac-carbon.h
+ *
+ *     Usage for Metrowerks CodeWarrior:
+ *             Edit menu -> _target_ Settings -> Language Settings ->
+ *             C/C++ Language ->
+ *             set "Prefix File" to include/mac-carbon.h
+ */
+
+#define MAC
+#undef UNIX
+
+/* May already be defined by CodeWarrior as 0 or 1 */
+#ifdef TARGET_API_MAC_CARBON
+# undef TARGET_API_MAC_CARBON
+#endif
+#define TARGET_API_MAC_CARBON 1
+
+#define GCC_WARN
diff --git a/include/mac-qt.h b/include/mac-qt.h
new file mode 100644 (file)
index 0000000..8a5a128
--- /dev/null
@@ -0,0 +1,33 @@
+/*     SCCS Id: @(#)mac-qt.h   3.4     2003/06/01      */
+/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 2003. */
+/* NetHack may be freely redistributed.  See license for details. */
+
+/*     Compiler prefix file for the Macintosh Qt port.
+ *
+ *     IMPORTANT: This file is intended only as a compiler prefix
+ *     file and must NEVER be included by other source (.c or .h)
+ *     files.
+ *
+ *     Usage for MacOS X Project Builder:
+ *             Project menu -> Edit Active Target '_target_' ->
+ *             target settings dialog -> Settings -> Simple View ->
+ *             GCC Compiler Settings ->
+ *             set "Prefix Header" to include/mac-qt.h
+ *
+ *     Usage for Metrowerks CodeWarrior:
+ *             Edit menu -> _target_ Settings -> Language Settings ->
+ *             C/C++ Language ->
+ *             set "Prefix File" to include/mac-qt.h
+ */
+
+#undef MAC
+#define UNIX
+#define BSD
+
+/* May already be defined by CodeWarrior as 0 or 1 */
+#ifdef TARGET_API_MAC_CARBON
+# undef TARGET_API_MAC_CARBON
+#endif
+#define TARGET_API_MAC_CARBON 0
+
+#define GCC_WARN
diff --git a/include/mac-term.h b/include/mac-term.h
new file mode 100644 (file)
index 0000000..f083c3e
--- /dev/null
@@ -0,0 +1,33 @@
+/*     SCCS Id: @(#)mac-term.h 3.4     2003/06/01      */
+/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 2003. */
+/* NetHack may be freely redistributed.  See license for details. */
+
+/*     Compiler prefix file for the MacOS X Terminal.app port.
+ *
+ *     IMPORTANT: This file is intended only as a compiler prefix
+ *     file and must NEVER be included by other source (.c or .h)
+ *     files.
+ *
+ *     Usage for MacOS X Project Builder:
+ *             Project menu -> Edit Active Target '_target_' ->
+ *             target settings dialog -> Settings -> Simple View ->
+ *             GCC Compiler Settings ->
+ *             set "Prefix Header" to include/mac-term.h
+ *
+ *     Usage for Metrowerks CodeWarrior:
+ *             Edit menu -> _target_ Settings -> Language Settings ->
+ *             C/C++ Language ->
+ *             set "Prefix File" to include/mac-term.h
+ */
+
+#undef MAC
+#define UNIX
+#define BSD
+
+/* May already be defined by CodeWarrior as 0 or 1 */
+#ifdef TARGET_API_MAC_CARBON
+# undef TARGET_API_MAC_CARBON
+#endif
+#define TARGET_API_MAC_CARBON 0
+
+#define GCC_WARN