summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2011-04-26 01:18:18 -0700
committerH. Peter Anvin <hpa@zytor.com>2011-04-26 01:18:18 -0700
commitd5b9f24567a26562ec1822235cbd08256b96c335 (patch)
tree8e5a4c6245652d9b610c6308d3f505cdf9292919
parentfaf815967c276bab95989d22a62b8378d7ebf6f3 (diff)
parent5b726ddd81fd77947e126b14c84fb843b63544c5 (diff)
downloadsyslinux-d5b9f24567a26562ec1822235cbd08256b96c335.tar.gz
Merge remote-tracking branch 'mfleming/for-hpa/makefile-cleanup'
Resolved Conflicts: com32/hdt/Makefile com32/sysdump/Makefile Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--Makefile3
-rw-r--r--Makefile.private2
-rw-r--r--com32/cmenu/Makefile5
-rw-r--r--com32/gdbstub/Makefile3
-rw-r--r--com32/gfxboot/Makefile3
-rw-r--r--com32/gpllib/Makefile3
-rw-r--r--com32/hdt/Makefile8
-rw-r--r--com32/lib/Makefile5
-rw-r--r--com32/libupload/Makefile3
-rw-r--r--com32/libutil/Makefile3
-rw-r--r--com32/lua/src/Makefile6
-rw-r--r--com32/mboot/Makefile6
-rw-r--r--com32/menu/Makefile8
-rw-r--r--com32/modules/Makefile3
-rw-r--r--com32/rosh/Makefile3
-rw-r--r--com32/samples/Makefile3
-rw-r--r--com32/sysdump/Makefile7
-rw-r--r--com32/tools/Makefile4
-rw-r--r--core/Makefile3
-rw-r--r--diag/geodsp/Makefile2
-rw-r--r--diag/mbr/Makefile3
-rw-r--r--dos/Makefile3
-rw-r--r--dosutil/Makefile3
-rw-r--r--extlinux/Makefile3
-rw-r--r--linux/Makefile3
-rw-r--r--lzo/Makefile3
-rw-r--r--mbr/Makefile3
-rw-r--r--memdisk/Makefile3
-rw-r--r--memdump/Makefile3
-rw-r--r--mk/build.mk (renamed from MCONFIG.build)2
-rw-r--r--mk/com32.mk (renamed from com32/MCONFIG)2
-rw-r--r--mk/devel.mk (renamed from MCONFIG.devel)0
-rw-r--r--mk/embedded.mk (renamed from MCONFIG.embedded)2
-rw-r--r--mk/lib.mk (renamed from com32/lib/MCONFIG)2
-rw-r--r--mk/rosh.mk (renamed from com32/rosh/MCONFIG)2
-rw-r--r--mk/syslinux.mk (renamed from MCONFIG)4
-rw-r--r--modules/Makefile3
-rwxr-xr-xmtools/Makefile3
-rw-r--r--sample/Makefile3
-rw-r--r--utils/Makefile3
40 files changed, 81 insertions, 55 deletions
diff --git a/Makefile b/Makefile
index 60a59560..0f500a33 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,8 @@
# Main Makefile for SYSLINUX
#
topdir = .
-include $(topdir)/MCONFIG
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/syslinux.mk
-include $(topdir)/version.mk
#
diff --git a/Makefile.private b/Makefile.private
index c70c204d..6ca0598f 100644
--- a/Makefile.private
+++ b/Makefile.private
@@ -18,7 +18,7 @@
.PHONY: official release
# These files are removed when tarballs are generated.
-PRIVATE = Makefile.private MCONFIG.devel
+PRIVATE = Makefile.private mk/devel.mk
GIT_DIR ?= .git
ABS_GIT_DIR := $(shell cd '$(GIT_DIR)' 2>/dev/null && pwd)
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 8e7fb430..4b7b8468 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 -I../gplinclude/zzjson
diff --git a/com32/hdt/Makefile b/com32/hdt/Makefile
index edacd85f..b4f4e359 100644
--- a/com32/hdt/Makefile
+++ b/com32/hdt/Makefile
@@ -16,11 +16,11 @@
##
topdir = ../..
-include ../MCONFIG
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/com32.mk
-LIBS = ../cmenu/libmenu/libmenu.a ../libutil/libutil_com.a \
- ../lib/libcom32.a ../libupload/libcom32upload.a $(LIBGCC)
-CFLAGS += -I$(com32)/cmenu/libmenu -I$(com32)
+LIBS = ../cmenu/libmenu/libmenu.a ../libupload/libcom32upload.a
+CFLAGS += -I$(com32)/cmenu/libmenu
MODULES = hdt.c32
TESTFILES =
diff --git a/com32/lib/Makefile b/com32/lib/Makefile
index bf0da998..105c2bd6 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/libupload/Makefile b/com32/libupload/Makefile
index c009b6b9..83053350 100644
--- a/com32/libupload/Makefile
+++ b/com32/libupload/Makefile
@@ -1,6 +1,7 @@
# Include configuration rules
topdir = ../..
-include ../lib/MCONFIG
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/com32.mk
REQFLAGS += -I./
diff --git a/com32/libutil/Makefile b/com32/libutil/Makefile
index 7a6b5272..83e23a0a 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 keyname.o \
sha1hash.o unbase64.o \
diff --git a/com32/lua/src/Makefile b/com32/lua/src/Makefile
index 4081bfe1..14b0e33d 100644
--- a/com32/lua/src/Makefile
+++ b/com32/lua/src/Makefile
@@ -16,9 +16,9 @@
##
topdir = ../../..
-include ../../MCONFIG
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/com32.mk
-LIBS = ../../lib/libcom32.a $(LIBGCC)
LNXLIBS =
# Temporarily allow warnings not being treated as errors
@@ -54,7 +54,7 @@ $(LIBLUA) : $(LIBLUA_OBJS)
$(AR) cq $@ $^
$(RANLIB) $@
-lua.elf : $(OBJS) $(LIBLUA) $(LIBS) $(C_LIBS)
+lua.elf : $(OBJS) $(LIBLUA) $(C_LIBS)
$(LD) $(LDFLAGS) -o $@ $^
tidy dist:
diff --git a/com32/mboot/Makefile b/com32/mboot/Makefile
index 7e6c2e96..b7ee1154 100644
--- a/com32/mboot/Makefile
+++ b/com32/mboot/Makefile
@@ -16,9 +16,9 @@
##
topdir = ../..
-include ../MCONFIG
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/com32.mk
-LIBS = ../libutil/libutil_com.a ../lib/libcom32.a $(LIBGCC)
LNXLIBS = ../libutil/libutil_lnx.a
MODULES = mboot.c32
@@ -28,7 +28,7 @@ OBJS = mboot.o map.o mem.o initvesa.o apm.o solaris.o syslinux.o
all: $(MODULES) $(TESTFILES)
-mboot.elf : $(OBJS) $(LIBS) $(C_LIBS)
+mboot.elf : $(OBJS) $(C_LIBS)
$(LD) $(LDFLAGS) -o $@ $^
tidy dist:
diff --git a/com32/menu/Makefile b/com32/menu/Makefile
index 2a032728..b67b997d 100644
--- a/com32/menu/Makefile
+++ b/com32/menu/Makefile
@@ -15,9 +15,9 @@
##
topdir = ../..
-include ../MCONFIG
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/com32.mk
-LIBS = ../libutil/libutil_com.a ../lib/libcom32.a $(LIBGCC)
LNXLIBS = ../libutil/libutil_lnx.a
MODULES = menu.c32 vesamenu.c32
@@ -28,10 +28,10 @@ COMMONOBJS = menumain.o readconfig.o passwd.o drain.o printmsg.o colors.o \
all: $(MODULES) $(TESTFILES)
-menu.elf : menu.o $(COMMONOBJS) $(LIBS) $(C_LIBS)
+menu.elf : menu.o $(COMMONOBJS) $(C_LIBS)
$(LD) $(LDFLAGS) -o $@ $^
-vesamenu.elf : vesamenu.o $(COMMONOBJS) $(LIBS) $(C_LIBS)
+vesamenu.elf : vesamenu.o $(COMMONOBJS) $(C_LIBS)
$(LD) $(LDFLAGS) -o $@ $^
tidy dist:
diff --git a/com32/modules/Makefile b/com32/modules/Makefile
index 8e061f73..e9ce1d1f 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/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 3de8a5b8..e4290993 100644
--- a/com32/sysdump/Makefile
+++ b/com32/sysdump/Makefile
@@ -16,10 +16,11 @@
##
topdir = ../..
-include ../MCONFIG
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/com32.mk
-include $(topdir)/version.mk
-LIBS = ../libutil/libutil_com.a ../lib/libcom32.a ../libupload/libcom32upload.a $(LIBGCC)
+LIBS = ../libupload/libcom32upload.a
LNXLIBS = ../libutil/libutil_lnx.a
CFLAGS += -I$(com32) -I$(topdir)
@@ -44,7 +45,7 @@ CFLAGS += -DDATE='"$(DATE)"'
all: $(MODULES) $(TESTFILES)
-sysdump.elf : $(OBJS) $(LIBS) $(C_LIBS)
+sysdump.elf : $(OBJS) $(C_LIBS)
$(LD) $(LDFLAGS) -o $@ $^
tidy dist:
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
diff --git a/core/Makefile b/core/Makefile
index e89c419a..112fe3a8 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -20,7 +20,8 @@ MAKEFLAGS += -r
MAKE += -r
topdir = ..
-include $(topdir)/MCONFIG.embedded
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/embedded.mk
-include $(topdir)/version.mk
OPTFLAGS =
diff --git a/diag/geodsp/Makefile b/diag/geodsp/Makefile
index 44002bb4..b76eb77d 100644
--- a/diag/geodsp/Makefile
+++ b/diag/geodsp/Makefile
@@ -19,7 +19,7 @@
#
topdir = ../..
-# include $(topdir)/MCONFIG.embedded
+# include $(topdir)/mk/embedded.mk
coredir = $(topdir)/core
BTARGET = geodsp1s.bin geodspms.bin \
diff --git a/diag/mbr/Makefile b/diag/mbr/Makefile
index a94253af..79ff9f01 100644
--- a/diag/mbr/Makefile
+++ b/diag/mbr/Makefile
@@ -17,7 +17,8 @@
topdir = ../..
mbrdir = $(topdir)/mbr
-include $(topdir)/MCONFIG.embedded
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/embedded.mk
all: handoff.bin
diff --git a/dos/Makefile b/dos/Makefile
index 2667de8c..5e5fc63f 100644
--- a/dos/Makefile
+++ b/dos/Makefile
@@ -15,7 +15,8 @@
##
topdir = ..
-include $(topdir)/MCONFIG.embedded
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/embedded.mk
CFLAGS += -D__MSDOS__
# CFLAGS += -DDEBUG
diff --git a/dosutil/Makefile b/dosutil/Makefile
index fc10ff90..5746e86b 100644
--- a/dosutil/Makefile
+++ b/dosutil/Makefile
@@ -2,7 +2,8 @@
# OpenWatcom compile and link utility
#
topdir = ..
-include $(topdir)/MCONFIG
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/syslinux.mk
WCL = wcl
WCLOPT = -6 -osx -mt -bt=DOS -l=COM
diff --git a/extlinux/Makefile b/extlinux/Makefile
index 83cf1a54..5da19e4a 100644
--- a/extlinux/Makefile
+++ b/extlinux/Makefile
@@ -15,7 +15,8 @@
##
topdir = ..
-include $(topdir)/MCONFIG
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/syslinux.mk
OPTFLAGS = -g -Os
INCLUDES = -I. -I.. -I../libinstaller
diff --git a/linux/Makefile b/linux/Makefile
index ffe22728..b9dac179 100644
--- a/linux/Makefile
+++ b/linux/Makefile
@@ -15,7 +15,8 @@
##
topdir = ..
-include $(topdir)/MCONFIG
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/syslinux.mk
OPTFLAGS = -g -O0 -Dalloca=malloc
INCLUDES = -I. -I.. -I../libinstaller
diff --git a/lzo/Makefile b/lzo/Makefile
index d88279dd..cf8f985a 100644
--- a/lzo/Makefile
+++ b/lzo/Makefile
@@ -11,7 +11,8 @@
## -----------------------------------------------------------------------
topdir = ..
-include $(topdir)/MCONFIG.build
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/build.mk
INCLUDES += -I./include
diff --git a/mbr/Makefile b/mbr/Makefile
index c3eb97a7..993bb100 100644
--- a/mbr/Makefile
+++ b/mbr/Makefile
@@ -16,7 +16,8 @@
#
topdir = ..
-include $(topdir)/MCONFIG.embedded
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/embedded.mk
all: mbr.bin altmbr.bin gptmbr.bin isohdpfx.bin isohdppx.bin \
mbr_c.bin altmbr_c.bin gptmbr_c.bin isohdpfx_c.bin isohdppx_c.bin \
diff --git a/memdisk/Makefile b/memdisk/Makefile
index 92f565a4..5475b44d 100644
--- a/memdisk/Makefile
+++ b/memdisk/Makefile
@@ -12,7 +12,8 @@
## -----------------------------------------------------------------------
topdir = ..
-include $(topdir)/MCONFIG.embedded
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/embedded.mk
-include $(topdir)/version.mk
INCLUDES = -I$(topdir)/com32/include
diff --git a/memdump/Makefile b/memdump/Makefile
index e56c7bd4..6a30431a 100644
--- a/memdump/Makefile
+++ b/memdump/Makefile
@@ -15,7 +15,8 @@
##
topdir = ..
-include $(topdir)/MCONFIG.embedded
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/embedded.mk
OPTFLAGS =
INCLUDES = -include code16.h -I.
diff --git a/MCONFIG.build b/mk/build.mk
index d1abff2a..0ca82bea 100644
--- a/MCONFIG.build
+++ b/mk/build.mk
@@ -14,7 +14,7 @@
## Right now we don't distinguish between "build" system and the "host"
## system, although we really should...
##
-include $(topdir)/MCONFIG
+include $(MAKEDIR)/syslinux.mk
OPTFLAGS = -g -Os
INCLUDES =
diff --git a/com32/MCONFIG b/mk/com32.mk
index a74ed326..4a6caae9 100644
--- a/com32/MCONFIG
+++ b/mk/com32.mk
@@ -15,7 +15,7 @@
## COM32 common configurables
##
-include $(topdir)/MCONFIG
+include $(MAKEDIR)/syslinux.mk
GCCOPT := $(call gcc_ok,-std=gnu99,)
GCCOPT += $(call gcc_ok,-m32,)
diff --git a/MCONFIG.devel b/mk/devel.mk
index 104207f5..104207f5 100644
--- a/MCONFIG.devel
+++ b/mk/devel.mk
diff --git a/MCONFIG.embedded b/mk/embedded.mk
index 9f5846d7..e8f3ae30 100644
--- a/MCONFIG.embedded
+++ b/mk/embedded.mk
@@ -14,7 +14,7 @@
## Make configuration for embedded directories
##
-include $(topdir)/MCONFIG
+include $(MAKEDIR)/syslinux.mk
GCCOPT := $(call gcc_ok,-m32,)
GCCOPT += $(call gcc_ok,-ffreestanding,)
diff --git a/com32/lib/MCONFIG b/mk/lib.mk
index 44278bd1..48b2a13d 100644
--- a/com32/lib/MCONFIG
+++ b/mk/lib.mk
@@ -1,6 +1,6 @@
# -*- makefile -*-
-include $(topdir)/MCONFIG
+include $(MAKEDIR)/syslinux.mk
GCCOPT := $(call gcc_ok,-std=gnu99,)
GCCOPT += $(call gcc_ok,-m32,)
diff --git a/com32/rosh/MCONFIG b/mk/rosh.mk
index 25c41396..7fdba0f1 100644
--- a/com32/rosh/MCONFIG
+++ b/mk/rosh.mk
@@ -15,7 +15,7 @@
##
## Include the COM32 common configurables
-include ../MCONFIG
+include $(MAKEDIR)/com32.mk
# CFLAGS = $(GCCOPT) $(GCCWARN) -march=i386 \
# -fomit-frame-pointer -D__COM32__ \
diff --git a/MCONFIG b/mk/syslinux.mk
index a71fd139..2d47f81b 100644
--- a/MCONFIG
+++ b/mk/syslinux.mk
@@ -77,7 +77,7 @@ UMAKEDEPS = -Wp,-MT,$@,-MMD,$(dir $@).$(notdir $@).d
# Items that are only appropriate during development; this file is
# removed when tarballs are generated.
--include $(topdir)/MCONFIG.devel
+-include $(makefiledir)/devel.mk
# Local additions, like -DDEBUG can go here
--include $(topdir)/MCONFIG.local
+-include $(makefiledir)/local.mk
diff --git a/modules/Makefile b/modules/Makefile
index 9b50bb23..f878c70d 100644
--- a/modules/Makefile
+++ b/modules/Makefile
@@ -15,7 +15,8 @@
##
topdir = ..
-include $(topdir)/MCONFIG.embedded
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/embedded.mk
INCLUDES = -I$(com32)/include
diff --git a/mtools/Makefile b/mtools/Makefile
index 6164d24c..04e9d7de 100755
--- a/mtools/Makefile
+++ b/mtools/Makefile
@@ -1,5 +1,6 @@
topdir = ..
-include $(topdir)/MCONFIG
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/syslinux.mk
OPTFLAGS = -g -Os
INCLUDES = -I. -I.. -I../libfat -I../libinstaller
diff --git a/sample/Makefile b/sample/Makefile
index d7f439ca..9e504d96 100644
--- a/sample/Makefile
+++ b/sample/Makefile
@@ -15,7 +15,8 @@
##
topdir = ..
-include $(topdir)/MCONFIG.embedded
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/embedded.mk
PPMTOLSS16 = $(topdir)/utils/ppmtolss16
diff --git a/utils/Makefile b/utils/Makefile
index 455eb828..eed07bba 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -15,7 +15,8 @@
#
topdir = ..
-include $(topdir)/MCONFIG
+MAKEDIR = $(topdir)/mk
+include $(MAKEDIR)/syslinux.mk
CFLAGS = $(GCCWARN) -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
LDFLAGS = -O2 -s