From 7d89c33c6777b39b127a7983def87ecfc8b1f096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Thomas?= Date: Wed, 6 Aug 2008 08:56:07 +0000 Subject: [PATCH] Update doc - remove code extract no longer valid --- docs/adding_a_new_platform.txt | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/docs/adding_a_new_platform.txt b/docs/adding_a_new_platform.txt index ab0a3dc8..87f9845d 100644 --- a/docs/adding_a_new_platform.txt +++ b/docs/adding_a_new_platform.txt @@ -31,17 +31,7 @@ Let's suppose that your new platform is called "foo". In order to compile eLua for foo, follow these steps: 1. create the src/platform/foo directory -2. change the main build script (SConstruct) to include your new platform: - -(BEGIN SConstruct) -.......................... -# Sanity check -if platform not in [ 'at91sam7x', 'i386', 'foo' ]: - print "Invalid platform", platform - sys.exit( -1 ) -.......................... -(END SConstruct) - +2. change the main build script (SConstruct) to include your new platform 3. you need at least 3 files (besides your platform specific files) in the src/platform/foo directory: @@ -53,6 +43,8 @@ if platform not in [ 'at91sam7x', 'i386', 'foo' ]: - platform_libs.h: see "platform modules.txt" for details. 4. implement the platform interface functions (see "platform interface.txt"). By - convention, they should be implemented in a file called "platform.c". + convention, they should be implemented in a file called "platform.c". Note that + SConstruct defines a C flag for your platform so you code can + do #ifdef ... 5. That's it! Build (see "building.txt") and enjoy!