diff options
Diffstat (limited to 'com32')
-rw-r--r-- | com32/MCONFIG | 98 | ||||
-rw-r--r-- | com32/cmenu/Makefile | 5 | ||||
-rw-r--r-- | com32/gdbstub/Makefile | 3 | ||||
-rw-r--r-- | com32/gfxboot/Makefile | 3 | ||||
-rw-r--r-- | com32/gpllib/Makefile | 3 | ||||
-rw-r--r-- | com32/hdt/Makefile | 3 | ||||
-rw-r--r-- | com32/lib/MCONFIG | 80 | ||||
-rw-r--r-- | com32/lib/Makefile | 5 | ||||
-rw-r--r-- | com32/libutil/Makefile | 3 | ||||
-rw-r--r-- | com32/lua/src/Makefile | 3 | ||||
-rw-r--r-- | com32/mboot/Makefile | 3 | ||||
-rw-r--r-- | com32/menu/Makefile | 3 | ||||
-rw-r--r-- | com32/modules/Makefile | 3 | ||||
-rw-r--r-- | com32/rosh/MCONFIG | 27 | ||||
-rw-r--r-- | com32/rosh/Makefile | 3 | ||||
-rw-r--r-- | com32/samples/Makefile | 3 | ||||
-rw-r--r-- | com32/sysdump/Makefile | 3 | ||||
-rw-r--r-- | com32/tools/Makefile | 4 |
18 files changed, 32 insertions, 223 deletions
diff --git a/com32/MCONFIG b/com32/MCONFIG deleted file mode 100644 index a74ed326..00000000 --- a/com32/MCONFIG +++ /dev/null @@ -1,98 +0,0 @@ -## -*- makefile -*- ------------------------------------------------------- -## -## Copyright 2008-2009 H. Peter Anvin - All Rights Reserved -## Copyright 2009 Intel Corporation; author: H. Peter Anvin -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -## Boston MA 02110-1301, USA; either version 2 of the License, or -## (at your option) any later version; incorporated herein by reference. -## -## ----------------------------------------------------------------------- - -## -## COM32 common configurables -## - -include $(topdir)/MCONFIG - -GCCOPT := $(call gcc_ok,-std=gnu99,) -GCCOPT += $(call gcc_ok,-m32,) -GCCOPT += $(call gcc_ok,-fno-stack-protector,) -GCCOPT += $(call gcc_ok,-fwrapv,) -GCCOPT += $(call gcc_ok,-freg-struct-return,) -GCCOPT += -mregparm=3 -DREGPARM=3 -march=i386 -Os -GCCOPT += $(call gcc_ok,-fPIE,-fPIC) -GCCOPT += $(call gcc_ok,-fno-exceptions,) -GCCOPT += $(call gcc_ok,-fno-asynchronous-unwind-tables,) -GCCOPT += $(call gcc_ok,-fno-strict-aliasing,) -GCCOPT += $(call gcc_ok,-falign-functions=0,-malign-functions=0) -GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0) -GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0) -GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0) -GCCOPT += $(call gcc_ok,-mpreferred-stack-boundary=2,) -GCCOPT += $(call gcc_ok,-incoming-stack-boundary=2,) - -com32 := $(topdir)/com32 -RELOCS := $(com32)/tools/relocs - -ifneq ($(NOGPL),1) -GPLLIB = $(com32)/gpllib/libcom32gpl.a -GPLINCLUDE = -I$(com32)/gplinclude -else -GPLLIB = -GPLINCLUDE = -endif - -CFLAGS = $(GCCOPT) $(GCCWARN) -march=i386 \ - -fomit-frame-pointer -D__COM32__ \ - -nostdinc -iwithprefix include \ - -I$(com32)/libutil/include -I$(com32)/include $(GPLINCLUDE) -SFLAGS = $(GCCOPT) $(GCCWARN) -march=i386 \ - -fomit-frame-pointer -D__COM32__ \ - -nostdinc -iwithprefix include \ - -I$(com32)/libutil/include -I$(com32)/include $(GPLINCLUDE) - -COM32LD = $(com32)/lib/com32.ld -LDFLAGS = -m elf_i386 --emit-relocs -T $(COM32LD) -LIBGCC := $(shell $(CC) $(GCCOPT) --print-libgcc) - -LNXCFLAGS = -I$(com32)/libutil/include $(GCCWARN) -O -g \ - -D_GNU_SOURCE -D_FORTIFY_SOURCE=0 -Wno-error -LNXSFLAGS = -g -LNXLDFLAGS = -g - -C_LIBS = $(com32)/libutil/libutil_com.a $(GPLLIB) \ - $(com32)/lib/libcom32.a $(LIBGCC) -C_LNXLIBS = $(com32)/libutil/libutil_lnx.a - -.SUFFIXES: .lss .c .lo .o .elf .c32 .lnx - -.PRECIOUS: %.o -%.o: %.S - $(CC) $(MAKEDEPS) $(SFLAGS) -c -o $@ $< - -.PRECIOUS: %.o -%.o: %.c - $(CC) $(MAKEDEPS) $(CFLAGS) -c -o $@ $< - -.PRECIOUS: %.elf -%.elf: %.o $(LIBS) $(C_LIBS) $(COM32LD) - $(LD) $(LDFLAGS) -o $@ $(filter-out $(COM32LD),$^) - -.PRECIOUS: %.lo -%.lo: %.S - $(CC) $(MAKEDEPS) $(LNXSFLAGS) -c -o $@ $< - -.PRECIOUS: %.lo -%.lo: %.c - $(CC) $(MAKEDEPS) $(LNXCFLAGS) -c -o $@ $< - -.PRECIOUS: %.lnx -%.lnx: %.lo $(LNXLIBS) $(C_LNXLIBS) - $(CC) $(LNXCFLAGS) -o $@ $^ - -%.c32: %.elf - $(OBJCOPY) -O binary $< $@ - $(RELOCS) $< >> $@ || ( rm -f $@ ; false ) diff --git a/com32/cmenu/Makefile b/com32/cmenu/Makefile index 794af741..446bbcdd 100644 --- a/com32/cmenu/Makefile +++ b/com32/cmenu/Makefile @@ -17,11 +17,12 @@ NOGPL := 1 -# This must be defined before MCONFIG is included +# This must be defined before com32.mk is included LIBS = libmenu/libmenu.a topdir = ../.. -include ../MCONFIG +MAKEDIR = $(topdir)/mk +include $(MAKEDIR)/com32.mk CFLAGS += -I./libmenu diff --git a/com32/gdbstub/Makefile b/com32/gdbstub/Makefile index 5513876b..38d003cc 100644 --- a/com32/gdbstub/Makefile +++ b/com32/gdbstub/Makefile @@ -15,7 +15,8 @@ ## topdir = ../.. -include ../MCONFIG +MAKEDIR = $(topdir)/mk +include $(MAKEDIR)/com32.mk CFLAGS += -fPIE diff --git a/com32/gfxboot/Makefile b/com32/gfxboot/Makefile index 73133e1b..183115f4 100644 --- a/com32/gfxboot/Makefile +++ b/com32/gfxboot/Makefile @@ -12,7 +12,8 @@ ## ----------------------------------------------------------------------- topdir = ../.. -include ../MCONFIG +MAKEDIR = $(topdir)/mk +include $(MAKEDIR)/com32.mk MODULES = gfxboot.c32 diff --git a/com32/gpllib/Makefile b/com32/gpllib/Makefile index a1740610..1c07068d 100644 --- a/com32/gpllib/Makefile +++ b/com32/gpllib/Makefile @@ -4,7 +4,8 @@ # Include configuration rules topdir = ../.. -include ../lib/MCONFIG +MAKEDIR = $(topdir)/mk +include $(MAKEDIR)/lib.mk REQFLAGS += -I../gplinclude diff --git a/com32/hdt/Makefile b/com32/hdt/Makefile index 40ea3ac4..5b559119 100644 --- a/com32/hdt/Makefile +++ b/com32/hdt/Makefile @@ -16,7 +16,8 @@ ## topdir = ../.. -include ../MCONFIG +MAKEDIR = $(topdir)/mk +include $(MAKEDIR)/com32.mk LIBS = ../cmenu/libmenu/libmenu.a ../libutil/libutil_com.a \ ../lib/libcom32.a $(LIBGCC) diff --git a/com32/lib/MCONFIG b/com32/lib/MCONFIG deleted file mode 100644 index 44278bd1..00000000 --- a/com32/lib/MCONFIG +++ /dev/null @@ -1,80 +0,0 @@ -# -*- makefile -*- - -include $(topdir)/MCONFIG - -GCCOPT := $(call gcc_ok,-std=gnu99,) -GCCOPT += $(call gcc_ok,-m32,) -GCCOPT += $(call gcc_ok,-fno-stack-protector,) -GCCOPT += $(call gcc_ok,-fwrapv,) -GCCOPT += $(call gcc_ok,-freg-struct-return,) -GCCOPT += $(call gcc_ok,-fPIE,-fPIC) -GCCOPT += $(call gcc_ok,-fno-exceptions,) -GCCOPT += $(call gcc_ok,-fno-asynchronous-unwind-tables,) -GCCOPT += $(call gcc_ok,-fno-strict-aliasing,) -GCCOPT += $(call gcc_ok,-falign-functions=0,-malign-functions=0) -GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0) -GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0) -GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0) -GCCOPT += $(call gcc_ok,-mpreferred-stack-boundary=2,) - -INCLUDE = -I. -STRIP = strip --strip-all -R .comment -R .note - -# zlib and libpng configuration flags -LIBFLAGS = -DDYNAMIC_CRC_TABLE -DPNG_NO_CONSOLE_IO \ - -DPNG_NO_WRITE_SUPPORTED \ - -DPNG_NO_MNG_FEATURES \ - -DPNG_NO_READ_tIME -DPNG_NO_WRITE_tIME - -# We need some features in libpng which apparently aren't available in the -# fixed-point versions. It's OK, because we have to have a non-graphical -# fallback anyway, just use that on old machines... -# LIBFLAGS += -DPNG_NO_FLOATING_POINT_SUPPORTED - -REQFLAGS = $(GCCOPT) -g -mregparm=3 -DREGPARM=3 -D__COM32__ \ - -nostdinc -iwithprefix include -I. -I./sys -I../include -OPTFLAGS = -Os -march=i386 -falign-functions=0 -falign-jumps=0 \ - -falign-labels=0 -ffast-math -fomit-frame-pointer -WARNFLAGS = $(GCCWARN) -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline - -CFLAGS = $(OPTFLAGS) $(REQFLAGS) $(WARNFLAGS) $(LIBFLAGS) -LDFLAGS = -m elf32_i386 - -.SUFFIXES: .c .o .a .so .lo .i .S .s .ls .ss .lss - -% : %.c # Cancel default rule - -% : %.S - -.c.o: - $(CC) $(MAKEDEPS) $(CFLAGS) -c -o $@ $< - -.c.i: - $(CC) $(MAKEDEPS) $(CFLAGS) -E -o $@ $< - -.c.s: - $(CC) $(MAKEDEPS) $(CFLAGS) -S -o $@ $< - -.S.o: - $(CC) $(MAKEDEPS) $(CFLAGS) -D__ASSEMBLY__ -c -o $@ $< - -.S.s: - $(CC) $(MAKEDEPS) $(CFLAGS) -D__ASSEMBLY__ -E -o $@ $< - -.S.lo: - $(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -D__ASSEMBLY__ -c -o $@ $< - -.S.ls: - $(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -D__ASSEMBLY__ -E -o $@ $< - -.s.o: - $(CC) $(MAKEDEPS) $(CFLAGS) -x assembler -c -o $@ $< - -.ls.lo: - $(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -x assembler -c -o $@ $< - -.c.lo: - $(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -c -o $@ $< - -.c.ls: - $(CC) $(MAKEDEPS) $(CFLAGS) $(SOFLAGS) -S -o $@ $< diff --git a/com32/lib/Makefile b/com32/lib/Makefile index 48a166dd..1b25b392 100644 --- a/com32/lib/Makefile +++ b/com32/lib/Makefile @@ -4,8 +4,9 @@ # Include configuration rules NOGPL := 1 -topdir = ../.. -include MCONFIG +topdir = ../../ +MAKEDIR = $(topdir)/mk +include $(MAKEDIR)/lib.mk LIBOBJS = \ abort.o atexit.o atoi.o atol.o atoll.o calloc.o creat.o \ diff --git a/com32/libutil/Makefile b/com32/libutil/Makefile index 02789ca6..5942a08c 100644 --- a/com32/libutil/Makefile +++ b/com32/libutil/Makefile @@ -30,7 +30,8 @@ ## topdir = ../.. -include ../MCONFIG +MAKEDIR = $(topdir)/mk +include $(MAKEDIR)/com32.mk LIBOBJS = ansiline.o ansiraw.o get_key.o sha1hash.o unbase64.o \ md5.o crypt-md5.o sha256crypt.o sha512crypt.o base64.o diff --git a/com32/lua/src/Makefile b/com32/lua/src/Makefile index 4081bfe1..04ea255e 100644 --- a/com32/lua/src/Makefile +++ b/com32/lua/src/Makefile @@ -16,7 +16,8 @@ ## topdir = ../../.. -include ../../MCONFIG +MAKEDIR = $(topdir)/mk +include $(MAKEDIR)/com32.mk LIBS = ../../lib/libcom32.a $(LIBGCC) LNXLIBS = diff --git a/com32/mboot/Makefile b/com32/mboot/Makefile index 7e6c2e96..cad320f2 100644 --- a/com32/mboot/Makefile +++ b/com32/mboot/Makefile @@ -16,7 +16,8 @@ ## topdir = ../.. -include ../MCONFIG +MAKEDIR = $(topdir)/mk +include $(MAKEDIR)/com32.mk LIBS = ../libutil/libutil_com.a ../lib/libcom32.a $(LIBGCC) LNXLIBS = ../libutil/libutil_lnx.a diff --git a/com32/menu/Makefile b/com32/menu/Makefile index 2a032728..f97a804b 100644 --- a/com32/menu/Makefile +++ b/com32/menu/Makefile @@ -15,7 +15,8 @@ ## topdir = ../.. -include ../MCONFIG +MAKEDIR = $(topdir)/mk +include $(MAKEDIR)/com32.mk LIBS = ../libutil/libutil_com.a ../lib/libcom32.a $(LIBGCC) LNXLIBS = ../libutil/libutil_lnx.a diff --git a/com32/modules/Makefile b/com32/modules/Makefile index 2d479132..6951b928 100644 --- a/com32/modules/Makefile +++ b/com32/modules/Makefile @@ -16,7 +16,8 @@ ## topdir = ../.. -include ../MCONFIG +MAKEDIR = $(topdir)/mk +include $(MAKEDIR)/com32.mk MODULES = chain.c32 config.c32 ethersel.c32 dmitest.c32 cpuidtest.c32 \ disk.c32 pcitest.c32 elf.c32 linux.c32 reboot.c32 pmload.c32 \ diff --git a/com32/rosh/MCONFIG b/com32/rosh/MCONFIG deleted file mode 100644 index 25c41396..00000000 --- a/com32/rosh/MCONFIG +++ /dev/null @@ -1,27 +0,0 @@ -## -*- makefile -*- ------------------------------------------------------- -## -## Copyright 2008 H. Peter Anvin - All Rights Reserved -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -## Boston MA 02110-1301, USA; either version 2 of the License, or -## (at your option) any later version; incorporated herein by reference. -## -## ----------------------------------------------------------------------- - -## -## COM32 GRC configurables -## - -## Include the COM32 common configurables -include ../MCONFIG - -# CFLAGS = $(GCCOPT) $(GCCWARN) -march=i386 \ -# -fomit-frame-pointer -D__COM32__ \ -# -nostdinc -iwithprefix include \ -# -I$(com32)/libutil/include -I$(com32)/include -# -g3 -dD - -# LNXCFLAGS = -I$(com32)/libutil/include $(GCCWARN) -O -g3 -D_GNU_SOURCE -dD -# -U__GNUC__ diff --git a/com32/rosh/Makefile b/com32/rosh/Makefile index f4b7d866..766f68d5 100644 --- a/com32/rosh/Makefile +++ b/com32/rosh/Makefile @@ -17,7 +17,8 @@ ## topdir = ../.. -include MCONFIG +MAKEDIR = $(topdir)/mk +include $(MAKEDIR)/rosh.mk # from com32/sysdump/Makefile # The DATE is set on the make command line when building binaries for diff --git a/com32/samples/Makefile b/com32/samples/Makefile index bee2b992..76986d59 100644 --- a/com32/samples/Makefile +++ b/com32/samples/Makefile @@ -15,7 +15,8 @@ ## topdir = ../.. -include ../MCONFIG +MAKEDIR = $(topdir)/mk +include $(MAKEDIR)/com32.mk all: hello.c32 resolv.c32 serialinfo.c32 \ localboot.c32 \ diff --git a/com32/sysdump/Makefile b/com32/sysdump/Makefile index bffee3a2..e2528f7e 100644 --- a/com32/sysdump/Makefile +++ b/com32/sysdump/Makefile @@ -16,7 +16,8 @@ ## topdir = ../.. -include ../MCONFIG +MAKEDIR = $(topdir)/mk +include $(MAKEDIR)/com32.mk -include $(topdir)/version.mk LIBS = ../libutil/libutil_com.a ../lib/libcom32.a $(LIBGCC) diff --git a/com32/tools/Makefile b/com32/tools/Makefile index e34296b4..7badabd2 100644 --- a/com32/tools/Makefile +++ b/com32/tools/Makefile @@ -10,8 +10,8 @@ ## ## ----------------------------------------------------------------------- -topdir = ../.. -include $(topdir)/MCONFIG.build +MAKEDIR = ../../mk +include $(MAKEDIR)/build.mk BINS = relocs |