Makefile for 2.0
David Woodhouse
dwmw2 at infradead.org
Mon Apr 23 05:10:59 EDT 2001
eauth at softsys.co.at said:
> I just tried to compile the rearranged sources with the 2.0 kernel, it
> seems that the Makefile doesn't support 2.0 anymore. There are no .o
> files produced, besides an empty mtdlink.o. What's the purpose of
> GNUmakefile?
The GNUmakefile is there to make compilation on 2.0 and 2.2 kernels work,
as well as compilation outside the source tree. GNU make will use that file
first, in preference to the Makefile in the same directory. That means I
can have perfectly clean 2.4-style Makefiles and use the GNUmakefile trick
to make them work in other kernels.
Note the trick with setting TOPDIR so that the Makefile includes the
_local_ Rules.make file, which has the necessary fixups so that everything
actually works.
Evidently I missed something, but it _ought_ to work.
ifeq ($(VERSION),2)
ifneq ($(PATCHLEVEL),4)
ifneq ($(PATCHLEVEL),5)
OLDTOPDIR := $(TOPDIR)
TOPDIR := $(shell pwd)
endif
endif
endif
include Makefile
ifeq ($(VERSION),2)
ifeq ($(PATCHLEVEL),0)
O_OBJS += initcalls.o
endif
endif
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org
More information about the linux-mtd
mailing list