[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[openap-cvs] : openap-main Makefile,1.7,1.8
From: |
David Kimdon <address@hidden> |
Subject: |
[openap-cvs] : openap-main Makefile,1.7,1.8 |
Date: |
Tue, 30 Jul 2002 14:15:19 -0400 |
Update of /cvsroot/openap/openap-main
In directory subversions:/tmp/cvs-serv12918
Modified Files:
Makefile
Log Message:
start of attempt to make a native build
Index: Makefile
===================================================================
RCS file: /cvsroot/openap/openap-main/Makefile,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Makefile 29 Jul 2002 23:54:32 -0000 1.7
+++ Makefile 30 Jul 2002 18:15:16 -0000 1.8
@@ -11,7 +11,7 @@
# Set this to your target flavor, if any. Leave it as 'def' if you
# want the default.
-FLAVOR=def
+FLAVOR=native
# No need to change anything below this line unless you are
# hacking on the build system.
@@ -32,29 +32,48 @@
OPENAP_VERSION = 0.1.3
TOPDIR := $(shell pwd)
STAMPDIR = $(TOPDIR)
-KERNEL_DIR = $(TOPDIR)/linux
IMAGE_DIR = $(TOPDIR)/Image_final
TARGET_CONFIG = $(TOPDIR)/config/$(TARGET)/config.in
+
+# If we are doing a build to be run on the native system we don't
+# set these variables. We will instead use whatever tools the
+# system uses by default.
+ifneq ($(FLAVOR),native)
# The echo's are just to remove leading and trailing quotes.
+KERNEL_DIR = $(TOPDIR)/linux
CONFIG_PREFIX := $(shell echo $(CONFIG_PREFIX))
CONFIG_TARGET := $(shell echo $(CONFIG_TARGET))
TARGET_PATH = $(CONFIG_PREFIX)/$(CONFIG_TARGET)
-CONFIG_SITE := $(TOPDIR)/config/cross-config.linux
+CONFIG_SITE = $(TOPDIR)/config/cross-config.linux
ARCH = $(shell echo $(CONFIG_TARGET) | sed -e 's/-.*//')
-CC = $(CONFIG_TARGET)-gcc
-TARGET_CC = $(CONFIG_TARGET)-gcc
-LD = $(CONFIG_TARGET)-ld
-AR = $(CONFIG_TARGET)-ar
-STRIP = $(CONFIG_TARGET)-strip
-OBJCOPY = $(CONFIG_TARGET)-objcopy
+CROSSCOMPILE = $(CONFIG_TARGET)-
+MKLIBSFLAGS = --no-default-lib -L $(CONFIG_PREFIX)/$(CONFIG_TARGET)/lib \
+ --target=$(CONFIG_TARGET) --ldlib=ld-uClibc.so.0
+PCMCIA_DIR = $(TOPDIR)/pcmcia-cs
+else
+# FIXME: KERNEL_DIR,PCMCIA_DIR are configurable parameters they
+# need to move to a better place
+PCMCIA_DIR =
+KERNEL_DIR = /usr/src/linux
+MKLIBSFLAGS = -L /usr/lib
+endif
+
+MKLIBSFLAGS +=-d $(IMAGE_DIR)/lib
+
+CC = $(CROSSCOMPILE)gcc
+TARGET_CC = $(CROSSCOMPILE)gcc
+LD = $(CROSSCOMPILE)ld
+AR = $(CROSSCOMPILE)ar
+STRIP = $(CROSSCOMPILE)strip
+OBJCOPY = $(CROSSCOMPILE)objcopy
MKNOD = /bin/mknod
INSTALL = /usr/bin/install
STRIPFLAGS = "--remove-section=.comment --remove-section=.note"
CFLAGS = -Wall -Wstrict-prototypes
HOSTCC = gcc
BUILD_CC = $(HOSTCC)
-BUILD_HOST := $(shell $(TOPDIR)/config/config.guess)
+BUILD_HOST = $(shell $(TOPDIR)/config/config.guess)
include make/rules.mk
include config/$(TARGET)/config.mk
@@ -66,12 +85,15 @@
bootstrap: tools configure kernel
+# This makes no sense for a native build
+ifneq ($(FLAVOR),native)
configure: $(STAMPDIR)/.configure config_pcmcia
$(STAMPDIR)/.configure: $(KERNEL_DIR)/.config $(TOPDIR)/.config
$(MAKE) -C $(KERNEL_DIR) oldconfig
$(MAKE) -C $(KERNEL_DIR) dep HOSTCC=$(HOSTCC)
$(MAKE) oldconfig
touch $(STAMPDIR)/.configure
+endif
# Convienience target, create a cross-compiling shell. The logic above sets
# some environmental variables that tell make, configure etc. to do the right
@@ -84,7 +106,14 @@
$(CONFIG_SHELL)
-PCMCIA_DIR := $(TOPDIR)/pcmcia-cs
+
+PCMCIA_OPTS=--kernel=$(KERNEL_DIR) --target=$(IMAGE_DIR) --trust --nocardbus \
+ --nopnp --noapm --ld=$(LD) --ucc=$(CC) --kcc=$(CC) --srctree
+
+ifneq ($(FLAVOR),native)
+PCMCIA_OPTS+=-n
+endif
+
config_pcmcia:
@if [ ! -L $(PCMCIA_DIR)/PCMCIA-HOWTO ] ; then \
ln -s doc/PCMCIA-HOWTO $(PCMCIA_DIR)/PCMCIA-HOWTO ; \
@@ -100,9 +129,7 @@
fi
cd $(PCMCIA_DIR) ; \
- $(PCMCIA_DIR)/Configure -n --kernel=$(KERNEL_DIR) \
- --target=$(IMAGE_DIR) --ld=$(LD) --ucc=$(CC) --kcc=$(CC) --trust \
- --nocardbus --nopnp --noapm --srctree ;
+ $(PCMCIA_DIR)/Configure $(PCMCIA_OPTS)
check:
if [ ! -u $(MKNOD) ] ; then \
@@ -215,16 +242,11 @@
# those symbols.
reduce:
$(INSTALL) -d $(IMAGE_DIR)/lib
- scripts/mklibs -v \
- --no-default-lib \
- -L $(CONFIG_PREFIX)/$(CONFIG_TARGET)/lib \
- --target=$(CONFIG_TARGET) \
- -d $(IMAGE_DIR)/lib \
- --ldlib=ld-uClibc.so.0 \
+ scripts/mklibs -v $(MKLIBSFLAGS) \
`find $(IMAGE_DIR) -type f -perm +0111`
checkconfig:
- [ -f $(TARGET_CONFIG) ] || \
+ @[ -f $(TARGET_CONFIG) ] || \
(echo "$(TARGET_CONFIG) does not exist!"; exit 1)
menuconfig: checkconfig
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [openap-cvs] : openap-main Makefile,1.7,1.8,
David Kimdon <address@hidden> <=