Here is the firsts patches for the MacOS X build. This is aimed to help
MacOS port to go forward as it require less work that a rough MacOS port
(without POSIX and other UNIXies).
The plan is to build MacOS X version using Carbon, then build the MacOS
version using Classic MacOS API (from which Carbon is derived) with
CodeWarrior and/or MPW.
There is a patch, a macosx.mk to add to "src/config/platforms/macosx.mk" and
a Makefile to add to the newly created "src/config/require/macosx" directory.
Hub
Index: BUILD.TXT
===================================================================
RCS file: /u2/cvsroot/abi/BUILD.TXT,v
retrieving revision 1.7
diff -c -r1.7 BUILD.TXT
*** BUILD.TXT 2000/04/22 05:52:09 1.7
--- BUILD.TXT 2000/08/02 06:39:26
***************
*** 89,94 ****
--- 89,104 ----
Expand this in /boot/apps. You can then run /boot/apps/AbiSuite/bin/AbiWord.
+ Build Instructions -- MacOS X
+ -----------------------------
+
+ Building on MacOS X is similar to the other platforms. We rely on the
+ GNU command line tools like zsh, sed, make, etc. that are provided on
+ MacOS X. Currently this will be the system to build a Carbon version
+ of AbiWord under MacOS X. Currently only Mach-O binary format is
+ supported (like on NeXTStep). A MPW Makefile and/or a CodeWarrior
+ project will be done later.
+
=======================================================================================
FAQ
Index: src/config/abi_defs.mk
===================================================================
RCS file: /u2/cvsroot/abi/src/config/abi_defs.mk,v
retrieving revision 1.104
diff -c -r1.104 abi_defs.mk
*** src/config/abi_defs.mk 2000/08/01 04:23:35 1.104
--- src/config/abi_defs.mk 2000/08/02 06:39:26
***************
*** 137,142 ****
--- 137,152 ----
##################################################################
##################################################################
+ #### if it is Darwin, we suspect taht we have MacOS X, hence we
+ #### build MacOS version using Carbon. Change later when we
+ #### support Darwin running X and other varieties (like MacOS X
+ #### using Cocoa). <[EMAIL PROTECTED]>
+ ifeq ($(OS_NAME), Darwin)
+ OS_NAME = MACOSX
+ endif
+
+ ##################################################################
+ ##################################################################
## Macros which help eliminate our need for a working copy of the
## INSTALL program...
***************
*** 328,333 ****
--- 338,348 ----
ifeq ($(OS_NAME), OSF1)
include $(ABI_ROOT)/src/config/platforms/osf1.mk
endif
+
+ ifeq ($(OS_NAME), MACOSX)
+ include $(ABI_ROOT)/src/config/platforms/macosx.mk
+ endif
+
# Catch all for undefined platform (CC will always be defined on a working platform)
ifndef CC
#! gmake
## AbiWord
## Copyright (C) 1998 AbiSource, Inc.
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
ABI_ROOT:=$(shell pwd)/../../../..
include $(ABI_ROOT)/src/config/abi_defs.mk
REQUIRE= _LIBICONV_ _LIBWV_
TARGET= build
include $(ABI_ROOT)/src/config/abi_rules.mk
build:: $(REQUIRE)
@echo Build requirements satisfied.
#################################################################
_LIBWV_:
@if [ -d $(ABI_ROOT)/../wv ]; then \
echo Found libwv in peer directory; \
if [ ! -r $(ABI_ROOT)/../wv/config.h ]; then \
cd $(ABI_ROOT)/../wv; \
./configure; \
fi; \
$(MAKE) -f Makefile.abi -C $(ABI_ROOT)/../wv; \
else \
echo wv not found; \
echo TODO provide a nicer error message; \
echo TODO with instructions for obtaining it; \
exit 1; \
fi
_LIBICONV_:
@if [ -d $(ABI_ROOT)/../libiconv ]; then \
echo Found libiconv in peer directory; \
if [ ! -r $(ABI_ROOT)/../libiconv/src/config.h ]; then \
cd $(ABI_ROOT)/../libiconv; \
./configure; \
fi; \
$(MAKE) -f Makefile.abi -C $(ABI_ROOT)/../libiconv; \
else \
echo libiconv not found; \
echo TODO provide a nicer error message; \
echo TODO with instructions for obtaining it; \
exit 1; \
fi
#! gmake
## AbiSource Program Utilities
## Copyright (C) 1998 AbiSource, Inc.
##
## This program is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License
## as published by the Free Software Foundation; either version 2
## of the License, or (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
##############################################################################
## MacOSX platform defines (grafted from FreeBSD)
##############################################################################
##################################################################
##################################################################
## The main makefile and/or this file requires that OS_ARCH be set
## to something to describe which chip that this OS is running on.
## This can be used to change which tools are used and/or which
## compiler/loader options are used. It will probably also be used
## in constructing the name object file destination directory.
#OS_ARCH := $(shell uname -m | sed "s/\//-/" )
#We should change this at some point in time to the generic x86/ppc
OS_ARCH := $(shell uname -p | sed "s/\//-/" | \
sed -e s/powerpc/ppc/)
# These are (probably) optional for your platform.
PPC_ARCH_FLAGS =
# Define tools
CC = cc
CCC = CC
RANLIB = ranlib
# Suffixes
OBJ_SUFFIX = o
LIB_SUFFIX = a
DLL_SUFFIX = so
AR = ar cr $@
# Compiler flags
ifdef ABI_OPT_DEBUG
OPTIMIZER = -g -Wall
DEFINES = -DDEBUG -UNDEBUG
OBJ_DIR_SFX = DBG
else
OPTIMIZER = -O2 -Wall
DEFINES =
OBJ_DIR_SFX = OBJ
endif
# Includes
OS_INCLUDES = -I/usr/local/include
G++INCLUDES = -I/usr/include/g++
# Compiler flags
PLATFORM_FLAGS = -DNO_SYS_ERRLIST
#PORT_FLAGS = -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR
-D_XOPEN_SOURCE -D__USE_XOPEN_EXTENDED
OS_CFLAGS = $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)
# Architecture-specific flags
ifeq ($(OS_ARCH), x86)
PLATFORM_FLAGS += $(X86_ARCH_FLAGS)
OS_ENDIAN = LittleEndian32
endif
ifeq ($(OS_ARCH), ppc)
PLATFORM_FLAGS += $(PPC_ARCH_FLAGS)
OS_ENDIAN = BigEndian32
endif
# Shared library flags
#MKSHLIB = $(LD) $(DSO_LDOPTS) -soname $(@:$(OBJDIR)/%.so=%.so)
MKSHLIB = $(LD) $(DSO_LDOPTS) -soname $(@:$(OBJDIR)/%.so=%.so)
ABI_NATIVE = macosx
ABI_FE = macosx
##################################################################
## ABIPKGDIR defines the directory containing the Makefile to use to
## build a set of distribution archives (.deb, .rpm, .tgz, .exe, etc)
## This is relative to $(ABI_ROOT)/src/pkg
ABIPKGDIR = macosx
# End of macos defs