summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/Makefile.common
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/Makefile.common')
-rw-r--r--mdk-stage1/Makefile.common53
1 files changed, 18 insertions, 35 deletions
diff --git a/mdk-stage1/Makefile.common b/mdk-stage1/Makefile.common
index 04c070fc2..f2c70273a 100644
--- a/mdk-stage1/Makefile.common
+++ b/mdk-stage1/Makefile.common
@@ -1,9 +1,9 @@
# -*- makefile -*-
#******************************************************************************
#
- # Guillaume Cottenceau (gc@mandrakesoft.com)
+ # Guillaume Cottenceau (gc)
#
- # Copyright 2000 MandrakeSoft
+ # Copyright 2000 Mandriva
#
# This software may be freely redistributed under the terms of the GNU
# public license.
@@ -15,50 +15,33 @@
#*****************************************************************************
ARCH := $(patsubst i%86,i386,$(shell uname -m))
-ARCH := $(patsubst sparc%,sparc,$(ARCH))
+ARCH := $(ARCH:arm%=arm)
- #- default lib is dietlibc (honoured by main Makefile whenever possible)
-L = DIETLIBC
-#L = GLIBC
+# DEBUG = 1
#- default frontend is newt (honoured by main Makefile whenever possible)
+ifdef DEBUG
+F = STDIO
+else
F = NEWT
-# F = STDIO
-
- #- override in some situations
-ifeq (ia64, $(ARCH))
-L = GLIBC
-endif
-ifeq (ppc, $(ARCH))
-L = GLIBC
-endif
-ifeq (x86_64, $(ARCH))
-#L = GLIBC
endif
-ifeq (DIETLIBC, $(L))
-DIET = $(top_dir)/dietlibc/bin-$(ARCH)/diet
-endif
-
-
- #- flags used by all stuff
-ifeq (ppc, $(ARCH))
-CFLAGS = -Os -pipe -Wall -fomit-frame-pointer -fno-strict-aliasing
+ifdef DEBUG
+OPTFLAGS = -g -DDEBUG
else
-CFLAGS = -Os -pipe -Wall -Werror -W -fomit-frame-pointer -fno-strict-aliasing
+OPTFLAGS = -Os
endif
-DIETLIBC_INCLUDES = -I$(top_dir)/dietlibc/include -I. -I$(top_dir)/bzlib
-GLIBC_INCLUDES = -I. -I$(top_dir)/bzlib
-INCLUDES = $($(L)_INCLUDES)
+#- flags used by all stuff
+CFLAGS = $(OPTFLAGS) -pipe -Wall -fomit-frame-pointer -fno-strict-aliasing -Werror
-GLIBC_LDFLAGS_STAGE1 = -static
-DIETLIBC_LDFLAGS_STAGE1 = -nostdlib
-LDFLAGS_STAGE1 = $($(L)_LDFLAGS_STAGE1)
+INCLUDES = -I.
-GLIBC_LIBC =
-DIETLIBC_LIBC =
-STAGE1_LIBC = $($(L)_LIBC)
+LDFLAGS =
+ifdef DEBUG
+STRIPCMD = echo not stripping
+else
STRIPCMD = strip -R .note -R .comment
+endif