convert config to makefile variables and autogenerate config.h
automatically set PREX_SRC if undefined
---
 Makefile                 |   11 +++
 conf/arm-gba.conf        |  149 +++++++++++++++++++++++++++++++++++++++++++++
 conf/config-arm-gba.h    |   74 ----------------------
 conf/config-i386-nommu.h |   75 -----------------------
 conf/config-i386-pc.h    |   74 ----------------------
 conf/config.h            |   14 ----
 conf/convert.sh          |   15 +++++
 conf/i386-nommu.conf     |  152 ++++++++++++++++++++++++++++++++++++++++++++++
 conf/i386-pc.conf        |  152 ++++++++++++++++++++++++++++++++++++++++++++++
 mk/Makefile              |    1 -
 mk/Makefile.inc          |   16 +++++
 11 files changed, 495 insertions(+), 238 deletions(-)
 create mode 100644 conf/arm-gba.conf
 delete mode 100755 conf/config-arm-gba.h
 delete mode 100755 conf/config-i386-nommu.h
 delete mode 100755 conf/config-i386-pc.h
 delete mode 100755 conf/config.h
 create mode 100755 conf/convert.sh
 create mode 100644 conf/i386-nommu.conf
 create mode 100644 conf/i386-pc.conf

diff --git a/Makefile b/Makefile
index c25c491..4d7ee6d 100755
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,13 @@
+
+PREX_SRC ?= $(shell pwd)
+
+#
+# System configuration
+#
+MAKEFILES  = $(PREX_SRC)/conf/make.conf
+MAKEFILES += $(PREX_SRC)/conf/$(PREX_ARCH)-$(PREX_PLATFORM).conf
+
+export PREX_SRC MAKEFILES
+
 SUBDIRS        = boot dev sys user mk
 include $(PREX_SRC)/mk/Makefile.inc
diff --git a/conf/arm-gba.conf b/conf/arm-gba.conf
new file mode 100644
index 0000000..ed6627c
--- /dev/null
+++ b/conf/arm-gba.conf
@@ -0,0 +1,149 @@
+# 
+#  Prex configuration file
+# 
+
+#
+#  System paramters
+#
+
+# Ticks/second of the clock
+CONFIG_HZ=100
+
+# Context switch ratio (msec)
+CONFIG_TIME_SLICE=50
+
+# Physical/logical page size
+CONFIG_PAGE_SIZE=2048
+
+# Max open files per process
+CONFIG_OPEN_MAX=8
+
+# Blocks for buffer cache
+CONFIG_BUF_CACHE=8
+
+# Number of file system threads
+CONFIG_FS_THREADS=1
+
+#
+#  Platform settings
+#
+
+# Memory management unit
+# CONFIG_MMU=y
+
+# Cache memory
+# CONFIG_CACHE=y
+
+# Floating point unit
+# CONFIG_FPU=y
+
+# Execution in place
+CONFIG_XIP=y
+
+# Byte order
+CONFIG_LITTLE_ENDIAN=y
+
+# Byte order
+# CONFIG_BIG_ENDIAN=y
+
+# Boot from ROM
+CONFIG_ROM_BOOT=y
+
+#
+#  Device drivers
+#
+
+# Keyboard
+CONFIG_KEYBOARD=m
+
+# Console
+CONFIG_CONSOLE=m
+
+# Floppy disk drive
+# CONFIG_FDD=m
+
+# Mouse
+# CONFIG_MOUSE=m
+
+# Real time clock
+# CONFIG_RTC=m
+
+# RAM disk
+CONFIG_RAMDISK=m
+
+#
+#  Power management
+#
+
+# Power management support
+# CONFIG_PM=y
+
+# Power policy: Battery optimized
+# CONFIG_PM_POWERSAVE=y
+
+# Power policy: Parformance optimized
+# CONFIG_PM_PERFORMANCE=y
+
+# CPU frequency control
+# CONFIG_CPUFREQ=y
+
+#
+#  File system
+#
+
+# Device file system
+CONFIG_DEVFS=y
+
+# RAM file system
+CONFIG_RAMFS=y
+
+# Archive file system
+CONFIG_ARFS=y
+
+# FAT file system
+# CONFIG_FATFS=y
+
+#
+#  Executable file format
+#
+
+# ELF file format
+CONFIG_ELF=y
+
+#
+#  Diagnostic options
+#
+
+# Diagnostic via screen
+# CONFIG_DIAG_SCREEN=y
+
+# Diagnostic via VBA emulater
+CONFIG_DIAG_VBA=y
+
+#
+#  Kernel hacking
+#
+
+# Kernel dump
+# CONFIG_KDUMP=y
+
+# Enable ring buffer for diagnostic message
+# CONFIG_DMESG=y
+
+# Kernel function trace
+# CONFIG_KTRACE=y
+
+# GDB stub
+# CONFIG_GDB=y
+
+# Debug virtual memory allocator
+# CONFIG_DEBUG_VM=y
+
+# Debug page allocator
+# CONFIG_DEBUG_PAGE=y
+
+# Debug kernel memory allocator
+# CONFIG_DEBUG_KMEM=y
+
+# Test under limited memory size
+# CONFIG_MIN_MEMORY=y
diff --git a/conf/config-arm-gba.h b/conf/config-arm-gba.h
deleted file mode 100755
index 909dcb5..0000000
--- a/conf/config-arm-gba.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Prex configuration file
- */
-
-/*
- * System paramters
- */
-#define CONFIG_HZ              100     /* Ticks/second of the clock */
-#define CONFIG_TIME_SLICE      50      /* Context switch ratio (msec) */
-#define CONFIG_PAGE_SIZE       2048    /* Physical/logical page size */
-#define CONFIG_OPEN_MAX                8       /* Max open files per process */
-#define CONFIG_BUF_CACHE       8       /* Blocks for buffer cache */
-#define CONFIG_FS_THREADS      1       /* Number of file system threads */
-
-/*
- * Platform settings
- */
-//#define CONFIG_MMU           /* Memory management unit */
-//#define CONFIG_CACHE         /* Cache memory */
-//#define CONFIG_FPU           /* Floating point unit */
-#define CONFIG_XIP             /* Execution in place */
-#define CONFIG_LITTLE_ENDIAN   /* Byte order */
-//#define CONFIG_BIG_ENDIAN    /* Byte order */
-#define CONFIG_ROM_BOOT                /* Boot from ROM */
-
-/*
- * Device drivers
- */
-#define CONFIG_KEYBOARD                /* Keyboard */
-#define CONFIG_CONSOLE         /* Console */
-//#define CONFIG_FDD           /* Floppy disk drive */
-//#define CONFIG_MOUSE         /* Mouse */
-//#define CONFIG_RTC           /* Real time clock */
-#define CONFIG_RAMDISK         /* RAM disk */
-
-/*
- * Power management
- */
-//#define CONFIG_PM            /* Power management support */
-//#define CONFIG_PM_POWERSAVE  /* Power policy: Battery optimized */
-//#define CONFIG_PM_PERFORMANCE        /* Power policy: Parformance optimized 
*/
-//#define CONFIG_CPUFREQ       /* CPU frequency control */
-
-/*
- * File system
- */
-#define CONFIG_DEVFS           /* Device file system */
-#define CONFIG_RAMFS           /* RAM file system */
-#define CONFIG_ARFS            /* Archive file system */
-//#define CONFIG_FATFS         /* FAT file system */
-
-/*
- * Executable file format
- */
-#define CONFIG_ELF             /* ELF file format */
-
-/*
- * Diagnostic options
- */
-//#define CONFIG_DIAG_SCREEN   /* Diagnostic via screen */
-#define CONFIG_DIAG_VBA        /* Diagnostic via VBA emulater */
-
-/*
- * Kernel hacking
- */
-//#define CONFIG_KDUMP         /* Kernel dump */
-//#define CONFIG_DMESG         /* Enable ring buffer for diagnostic message */
-//#define CONFIG_KTRACE                /* Kernel function trace */
-//#define CONFIG_GDB           /* GDB stub */
-//#define CONFIG_DEBUG_VM      /* Debug virtual memory allocator */
-//#define CONFIG_DEBUG_PAGE    /* Debug page allocator */
-//#define CONFIG_DEBUG_KMEM    /* Debug kernel memory allocator */
-//#define CONFIG_MIN_MEMORY    /* Test under limited memory size */
-
diff --git a/conf/config-i386-nommu.h b/conf/config-i386-nommu.h
deleted file mode 100755
index a58df36..0000000
--- a/conf/config-i386-nommu.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Prex configuration file
- */
-
-/*
- * System paramters
- */
-#define CONFIG_HZ              1000    /* Ticks/second of the clock */
-#define CONFIG_TIME_SLICE      50      /* Context switch ratio (msec) */
-#define CONFIG_PAGE_SIZE       2048    /* Physical/logical page size */
-#define CONFIG_OPEN_MAX                8       /* Max open files per process */
-#define CONFIG_BUF_CACHE       32      /* Blocks for buffer cache */
-#define CONFIG_FS_THREADS      1       /* Number of file system threads */
-
-/*
- * Platform settings
- */
-//#define CONFIG_MMU           /* Memory management unit */
-#define CONFIG_CACHE           /* Cache memory */
-//#define CONFIG_FPU           /* Floating point unit */
-#define CONFIG_XIP             /* Execution in place */
-#define CONFIG_LITTLE_ENDIAN   /* Byte order */
-//#define CONFIG_BIG_ENDIAN    /* Byte order */
-//#define CONFIG_ROM_BOOT      /* Boot from ROM */
-
-/*
- * Device drivers
- */
-#define CONFIG_KEYBOARD                /* Keyboard */
-#define CONFIG_CONSOLE         /* Console */
-#define CONFIG_FDD             /* Floppy disk drive */
-#define CONFIG_MOUSE           /* Mouse */
-#define CONFIG_RTC             /* Real time clock */
-#define CONFIG_RAMDISK         /* RAM disk */
-
-/*
- * Power management
- */
-#define CONFIG_PM              /* Power management support */
-#define CONFIG_PM_POWERSAVE    /* Power policy: Battery optimized */
-//#define CONFIG_PM_PERFORMANCE        /* Power policy: Parformance optimized 
*/
-#define CONFIG_CPUFREQ         /* CPU frequency control */
-#define CONFIG_DVS_EMULATION   /* Dynamic voltage scaling emulation on Bochs */
-
-/*
- * File system
- */
-#define CONFIG_DEVFS           /* Device file system */
-#define CONFIG_RAMFS           /* RAM file system */
-#define CONFIG_ARFS            /* Archive file system */
-#define CONFIG_FATFS           /* FAT file system */
-
-/*
- * Executable file format
- */
-#define CONFIG_ELF             /* ELF file format */
-
-/*
- * Diagnostic options
- */
-#define CONFIG_DIAG_SCREEN     /* Diagnostic via screen */
-//#define CONFIG_DIAG_BOCHS    /* Diagnostic via Bochs emulater */
-
-/*
- * Kernel hacking
- */
-#define CONFIG_KDUMP           /* Kernel dump */
-#define CONFIG_DMESG           /* Enable ring buffer for diagnostic message */
-//#define CONFIG_KTRACE                /* Kernel function trace */
-//#define CONFIG_GDB           /* GDB stub */
-//#define CONFIG_DEBUG_VM      /* Debug virtual memory allocator */
-//#define CONFIG_DEBUG_PAGE    /* Debug page allocator */
-//#define CONFIG_DEBUG_KMEM    /* Debug kernel memory allocator */
-#define CONFIG_MIN_MEMORY      /* Test under limited memory size */
-
diff --git a/conf/config-i386-pc.h b/conf/config-i386-pc.h
deleted file mode 100755
index 84797b6..0000000
--- a/conf/config-i386-pc.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Prex configuration file
- */
-
-/*
- * System paramters
- */
-#define CONFIG_HZ              1000    /* Ticks/second of the clock */
-#define CONFIG_TIME_SLICE      50      /* Context switch ratio (msec) */
-#define CONFIG_PAGE_SIZE       4096    /* Physical/logical page size */
-#define CONFIG_OPEN_MAX                16      /* Max open files per process */
-#define CONFIG_BUF_CACHE       64      /* Blocks for buffer cache */
-#define CONFIG_FS_THREADS      1       /* Number of file system threads */
-
-/*
- * Platform settings
- */
-#define CONFIG_MMU             /* Memory management unit */
-#define CONFIG_CACHE           /* Cache memory */
-//#define CONFIG_FPU           /* Floating point unit */
-//#define CONFIG_XIP           /* Execution in place */
-#define CONFIG_LITTLE_ENDIAN   /* Byte order */
-//#define CONFIG_BIG_ENDIAN    /* Byte order */
-//#define CONFIG_ROM_BOOT      /* Boot from ROM */
-
-/*
- * Device drivers
- */
-#define CONFIG_KEYBOARD                /* Keyboard */
-#define CONFIG_CONSOLE         /* Console */
-#define CONFIG_FDD             /* Floppy disk drive */
-#define CONFIG_MOUSE           /* Mouse */
-#define CONFIG_RTC             /* Real time clock */
-#define CONFIG_RAMDISK         /* RAM disk */
-
-/*
- * Power management
- */
-#define CONFIG_PM              /* Power management support */
-#define CONFIG_PM_POWERSAVE    /* Power policy: Battery optimized */
-//#define CONFIG_PM_PERFORMANCE        /* Power policy: Parformance optimized 
*/
-#define CONFIG_CPUFREQ         /* CPU frequency control */
-#define CONFIG_DVS_EMULATION   /* Dynamic voltage scaling emulation on Bochs */
-
-/*
- * File system
- */
-#define CONFIG_DEVFS           /* Device file system */
-#define CONFIG_RAMFS           /* RAM file system */
-#define CONFIG_ARFS            /* Archive file system */
-#define CONFIG_FATFS           /* FAT file system */
-
-/*
- * Executable file format
- */
-#define CONFIG_ELF             /* ELF file format */
-
-/*
- * Diagnostic options
- */
-#define CONFIG_DIAG_SCREEN     /* Diagnostic via screen */
-//#define CONFIG_DIAG_BOCHS    /* Diagnostic via Bochs emulater */
-
-/*
- * Kernel hacking
- */
-#define CONFIG_KDUMP           /* Kernel dump */
-#define CONFIG_DMESG           /* Enable ring buffer for diagnostic message */
-//#define CONFIG_KTRACE                /* Kernel function trace */
-//#define CONFIG_GDB           /* GDB stub */
-//#define CONFIG_DEBUG_VM      /* Debug virtual memory allocator */
-//#define CONFIG_DEBUG_PAGE    /* Debug page allocator */
-//#define CONFIG_DEBUG_KMEM    /* Debug kernel memory allocator */
-#define CONFIG_MIN_MEMORY      /* Test under limited memory size */
diff --git a/conf/config.h b/conf/config.h
deleted file mode 100755
index f4b54de..0000000
--- a/conf/config.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef _CONFIG_H
-#define _CONFIG_H
-
-#if defined(__i386__) && defined(__pc__)
-#include "config-i386-pc.h"
-#endif
-#if defined(__i386__) && defined(__nommu__)
-#include "config-i386-nommu.h"
-#endif
-#if defined(__arm__) && defined(__gba__)
-#include "config-arm-gba.h"
-#endif
-
-#endif /* !_CONFIG_H */
diff --git a/conf/convert.sh b/conf/convert.sh
new file mode 100755
index 0000000..c816dea
--- /dev/null
+++ b/conf/convert.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+PREX_ARCH=${1:?'prex arch, ie ppc, i386, arm'}
+PREX_PLATFORM=${2:?'prex platform, ie pc, nommu, gba'}
+OLD=config-$PREX_ARCH-$PREX_PLATFORM.h
+NEW=$PREX_ARCH-$PREX_PLATFORM.conf
+
+sed -e "s,^/\*,# ," $OLD > $NEW
+sed -i -e "s,^ \*/,# ," $NEW
+sed -i -e "s,^ \*,# ," $NEW
+sed -i -e "s,\*/,," $NEW
+sed -i -e "s,/\*,#," $NEW
+sed -i -e "s,^#define \(CONFIG_[A-Z_]*\)[      ]*\([0-9]\+\),\1=\2," $NEW
+sed -i -e "s,^#define \(CONFIG_[A-Z_]*\),\1=y," $NEW
+sed -i -e "s,^//#define \(CONFIG_[A-Z_]*\),# \1=y," $NEW
+sed -i -e "s,\(.*CONFIG_[A-Z_]*=[a-z0-9]*\)[ \t]*\(.*\),\n\2\n\1," $NEW
diff --git a/conf/i386-nommu.conf b/conf/i386-nommu.conf
new file mode 100644
index 0000000..0c8b699
--- /dev/null
+++ b/conf/i386-nommu.conf
@@ -0,0 +1,152 @@
+#
+#  Prex configuration file
+#
+
+#
+#  System paramters
+#
+
+# Ticks/second of the clock
+CONFIG_HZ=1000
+
+# Context switch ratio (msec)
+CONFIG_TIME_SLICE=50
+
+# Physical/logical page size
+CONFIG_PAGE_SIZE=2048
+
+# Max open files per process
+CONFIG_OPEN_MAX=8
+
+# Blocks for buffer cache
+CONFIG_BUF_CACHE=32
+
+# Number of file system threads
+CONFIG_FS_THREADS=1
+
+#
+#  Platform settings
+#
+
+# Memory management unit
+# CONFIG_MMU=y
+
+# Cache memory
+CONFIG_CACHE=y
+
+# Floating point unit
+# CONFIG_FPU=y
+
+# Execution in place
+CONFIG_XIP=y
+
+# Byte order
+CONFIG_LITTLE_ENDIAN=y
+
+# Byte order
+# CONFIG_BIG_ENDIAN=y
+
+# Boot from ROM
+# CONFIG_ROM_BOOT=y
+
+#
+#  Device drivers
+#
+
+# Keyboard
+CONFIG_KEYBOARD=m
+
+# Console
+CONFIG_CONSOLE=m
+
+# Floppy disk drive
+CONFIG_FDD=m
+
+# Mouse
+CONFIG_MOUSE=m
+
+# Real time clock
+CONFIG_RTC=m
+
+# RAM disk
+CONFIG_RAMDISK=m
+
+#
+#  Power management
+#
+
+# Power management support
+CONFIG_PM=m
+
+# Power policy: Battery optimized
+CONFIG_PM_POWERSAVE=y
+
+# Power policy: Parformance optimized
+# CONFIG_PM_PERFORMANCE=y
+
+# CPU frequency control
+CONFIG_CPUFREQ=m
+
+# Dynamic voltage scaling emulation on Bochs
+CONFIG_DVS_EMULATION=y
+
+#
+#  File system
+#
+
+# Device file system
+CONFIG_DEVFS=y
+
+# RAM file system
+CONFIG_RAMFS=y
+
+# Archive file system
+CONFIG_ARFS=y
+
+# FAT file system
+CONFIG_FATFS=y
+
+#
+#  Executable file format
+#
+
+# ELF file format
+CONFIG_ELF=y
+
+#
+#  Diagnostic options
+#
+
+# Diagnostic via screen
+CONFIG_DIAG_SCREEN=y
+
+# Diagnostic via Bochs emulater
+# CONFIG_DIAG_BOCHS=y
+
+#
+#  Kernel hacking
+#
+
+# Kernel dump
+CONFIG_KDUMP=y
+
+# Enable ring buffer for diagnostic message
+CONFIG_DMESG=y
+
+# Kernel function trace
+# CONFIG_KTRACE=y
+
+# GDB stub
+# CONFIG_GDB=y
+
+# Debug virtual memory allocator
+# CONFIG_DEBUG_VM=y
+
+# Debug page allocator
+# CONFIG_DEBUG_PAGE=y
+
+# Debug kernel memory allocator
+# CONFIG_DEBUG_KMEM=y
+
+# Test under limited memory size
+CONFIG_MIN_MEMORY=y
diff --git a/conf/i386-pc.conf b/conf/i386-pc.conf
new file mode 100644
index 0000000..26d9c13
--- /dev/null
+++ b/conf/i386-pc.conf
@@ -0,0 +1,152 @@
+#
+#  Prex configuration file
+#
+
+#
+#  System paramters
+#
+
+# Ticks/second of the clock
+CONFIG_HZ=1000
+
+# Context switch ratio (msec)
+CONFIG_TIME_SLICE=50
+
+# Physical/logical page size
+CONFIG_PAGE_SIZE=4096
+
+# Max open files per process
+CONFIG_OPEN_MAX=16
+
+# Blocks for buffer cache
+CONFIG_BUF_CACHE=64
+
+# Number of file system threads
+CONFIG_FS_THREADS=1
+
+#
+#  Platform settings
+#
+
+# Memory management unit
+CONFIG_MMU=y
+
+# Cache memory
+CONFIG_CACHE=y
+
+# Floating point unit
+# CONFIG_FPU=y
+
+# Execution in place
+# CONFIG_XIP=y
+
+# Byte order
+CONFIG_LITTLE_ENDIAN=y
+
+# Byte order
+# CONFIG_BIG_ENDIAN=y
+
+# Boot from ROM
+# CONFIG_ROM_BOOT=y
+
+#
+#  Device drivers
+#
+
+# Keyboard
+CONFIG_KEYBOARD=m
+
+# Console
+CONFIG_CONSOLE=m
+
+# Floppy disk drive
+CONFIG_FDD=m
+
+# Mouse
+CONFIG_MOUSE=m
+
+# Real time clock
+CONFIG_RTC=m
+
+# RAM disk
+CONFIG_RAMDISK=m
+
+#
+#  Power management
+#
+
+# Power management support
+CONFIG_PM=m
+
+# Power policy: Battery optimized
+CONFIG_PM_POWERSAVE=y
+
+# Power policy: Parformance optimized
+# CONFIG_PM_PERFORMANCE=y
+
+# CPU frequency control
+CONFIG_CPUFREQ=m
+
+# Dynamic voltage scaling emulation on Bochs
+CONFIG_DVS_EMULATION=y
+
+#
+#  File system
+#
+
+# Device file system
+CONFIG_DEVFS=y
+
+# RAM file system
+CONFIG_RAMFS=y
+
+# Archive file system
+CONFIG_ARFS=y
+
+# FAT file system
+CONFIG_FATFS=y
+
+#
+#  Executable file format
+#
+
+# ELF file format
+CONFIG_ELF=y
+
+#
+#  Diagnostic options
+#
+
+# Diagnostic via screen
+CONFIG_DIAG_SCREEN=y
+
+# Diagnostic via Bochs emulater
+# CONFIG_DIAG_BOCHS=y
+
+#
+#  Kernel hacking
+#
+
+# Kernel dump
+CONFIG_KDUMP=y
+
+# Enable ring buffer for diagnostic message
+CONFIG_DMESG=y
+
+# Kernel function trace
+# CONFIG_KTRACE=y
+
+# GDB stub
+# CONFIG_GDB=y
+
+# Debug virtual memory allocator
+# CONFIG_DEBUG_VM=y
+
+# Debug page allocator
+# CONFIG_DEBUG_PAGE=y
+
+# Debug kernel memory allocator
+# CONFIG_DEBUG_KMEM=y
+
+# Test under limited memory size
+CONFIG_MIN_MEMORY=y
diff --git a/mk/Makefile b/mk/Makefile
index a7e9f01..165270f 100755
--- a/mk/Makefile
+++ b/mk/Makefile
@@ -6,5 +6,4 @@ TYPE    = OS_IMAGE
 LOADER = $(PREX_SRC)/boot/bootldr
 KERNEL = $(PREX_SRC)/sys/prex
 
-include $(PREX_SRC)/conf/make.conf
 include $(PREX_SRC)/mk/Makefile.inc
diff --git a/mk/Makefile.inc b/mk/Makefile.inc
index 809acd1..02d64d5 100755
--- a/mk/Makefile.inc
+++ b/mk/Makefile.inc
@@ -52,6 +52,7 @@ STRIP = $(CROSS_COMPILE)strip
 LINT   = splint
 MAKE   = make
 RM     = rm
+SED    = sed
 #SHELL = /bin/sh
 ifdef SHELL_PATH
 SHELL  = $(SHELL_PATH)
@@ -120,6 +121,18 @@ endif
 all: $(SUBDIRS) $(TARGET)
 
 #
+# Rules to build config.h
+#
+ifeq (0,${MAKELEVEL})
+# add dependency on config.h
+$(SUBDIRS): $(PREX_SRC)/conf/config.h
+
+$(PREX_SRC)/conf/config.h: $(PREX_SRC)/conf/$(PREX_ARCH)-$(PREX_PLATFORM).conf
+       @echo //autogenerated from $(PREX_ARCH)-$(PREX_PLATFORM).conf > $@
+       @$(SED) -n "s,^\(CONFIG_[A-Z_]*\)=\([A-Za-z0-9_]*\).*,#define \1 \2,p" 
$< >> $@
+endif
+
+#
 # Rules to process sub-directory
 #
 ifdef SUBDIRS
@@ -273,5 +286,8 @@ endif
 ifdef CLEANS
        $(RM) -f $(CLEANS)
 endif
+ifeq (0,${MAKELEVEL})
+       $(RM) -f $(PREX_SRC)/conf/config.h
+endif
 
 .PHONY: dummy
\ No newline at end of file
-- 
1.5.0.3.GIT




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Prex-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/prex-devel

Reply via email to