diff options
author | Antoine Ginies <aginies@mandriva.com> | 2011-01-19 10:44:49 +0000 |
---|---|---|
committer | Antoine Ginies <aginies@mandriva.com> | 2011-01-19 10:44:49 +0000 |
commit | 530a16ec071db0e24e6e949e265a96848864967c (patch) | |
tree | fe40cacd28d67b98186754c551b7fd339ebc7e17 /mdk-stage1/Makefile.common | |
download | drakx-backup-do-not-use-530a16ec071db0e24e6e949e265a96848864967c.tar drakx-backup-do-not-use-530a16ec071db0e24e6e949e265a96848864967c.tar.gz drakx-backup-do-not-use-530a16ec071db0e24e6e949e265a96848864967c.tar.bz2 drakx-backup-do-not-use-530a16ec071db0e24e6e949e265a96848864967c.tar.xz drakx-backup-do-not-use-530a16ec071db0e24e6e949e265a96848864967c.zip |
add mes5-2.6.33 branch
Diffstat (limited to 'mdk-stage1/Makefile.common')
-rw-r--r-- | mdk-stage1/Makefile.common | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/mdk-stage1/Makefile.common b/mdk-stage1/Makefile.common new file mode 100644 index 000000000..f5209a58e --- /dev/null +++ b/mdk-stage1/Makefile.common @@ -0,0 +1,68 @@ + # -*- makefile -*- + #****************************************************************************** + # + # Guillaume Cottenceau (gc@mandrakesoft.com) + # + # Copyright 2000 Mandrakesoft + # + # This software may be freely redistributed under the terms of the GNU + # public license. + # + # 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., 675 Mass Ave, Cambridge, MA 02139, USA. + # + #***************************************************************************** + +ARCH := $(patsubst i%86,i386,$(shell uname -m)) +ARCH := $(patsubst sparc%,sparc,$(ARCH)) + +# DEBUG = 1 + + #- default frontend is newt (honoured by main Makefile whenever possible) +ifdef DEBUG +F = STDIO +else +F = NEWT +endif + +DIET = $(shell test -x /usr/bin/diet && echo diet) + +ifeq ($(DIET), diet) + #- default lib is dietlibc (honoured by main Makefile whenever possible) +L = DIETLIBC +else +L = GLIBC +endif + +ifdef DEBUG +OPTFLAGS = -g +else +OPTFLAGS = -Os +endif + +#- flags used by all stuff +CFLAGS = $(OPTFLAGS) -pipe -Wall -fomit-frame-pointer -fno-strict-aliasing + +ifneq (ppc, $(ARCH)) +ifneq (sparc, $(ARCH)) +CFLAGS += -Werror +endif +endif + +DIETLIBC_INCLUDES = -I/usr/lib/dietlibc/include -I. +DIETLIBC_LIBC = /usr/lib/dietlibc/lib-$(ARCH)/libcompat.a +GLIBC_INCLUDES = -I. +INCLUDES = $($(L)_INCLUDES) + +GLIBC_LDFLAGS = -static +LDFLAGS = $($(L)_LDFLAGS) + +STAGE1_LIBC = $($(L)_LIBC) + +ifdef DEBUG +STRIPCMD = echo not stripping +else +STRIPCMD = strip -R .note -R .comment +endif + |