Hi all. This patch restructures the dependencies for genmap so that they're more automatic, by relying more on Implicit Rules, and makes speakupmain.o actually depend on speakupmain-objes. It worked fine for me with 2.6.6-rc3. Thanks, Ameer -------------- next part -------------- --- Makefile.orig 2004-05-05 21:39:03.000000000 -0400 +++ Makefile 2004-05-05 21:38:02.000000000 -0400 @@ -4,7 +4,8 @@ V := $(shell awk '/UTS_RELEASE/ {print substr($$3,2,3)}' $(TOPDIR)/include/linux/version.h) #V := $(shell awk '/UTS_RELEASE/ {print substr($$3,2,3)}' include/linux/version.h) -ifeq ($V,2.4) + ifeq ($V,2.4) + # Note! Dependencies are done automagically by 'make dep', which also # removes any old dependencies. DON'T put your own dependencies here # unless it's something special (ie not a .c file). @@ -12,6 +13,7 @@ # Note 2! The CFLAGS definitions are now inherited from the # parent makes.. # + O_TARGET := spk.o export-objs := speakup_drvcommon.o speakup.o endif @@ -26,28 +28,22 @@ obj-$(CONFIG_SPEAKUP_DECEXT) += speakup_decext.o obj-$(CONFIG_SPEAKUP_DECPC) += speakup_decpc.o obj-$(CONFIG_SPEAKUP_DECTLK) += speakup_dectlk.o -obj-$(CONFIG_SPEAKUP_DTLK) += speakup_dtlk.o +/obj-$(CONFIG_SPEAKUP_DTLK) += speakup_dtlk.o obj-$(CONFIG_SPEAKUP_KEYPC) += speakup_keypc.o obj-$(CONFIG_SPEAKUP_LTLK) += speakup_ltlk.o obj-$(CONFIG_SPEAKUP_SFTSYN) += speakup_sftsyn.o obj-$(CONFIG_SPEAKUP_SPKOUT) += speakup_spkout.o obj-$(CONFIG_SPEAKUP_TXPRT) += speakup_txprt.o - ifeq ($V,2.4) - include $(TOPDIR)/Rules.make - -speakupmap.h: speakupmap.map genmap - ./genmap speakupmap.map >$@ -genmap: genmap.c mapdata.h - cc -o genmap genmap.c - -mapdata.h: makemapdata.c keyinfo.h - cc -o makemapdata makemapdata.c - ./makemapdata >mapdata.h + include $(TOPDIR)/Rules.make -endif -speakupmain.o:speakup.o speakup_drvcommon.o +endif#we put all the various deps for genmap here +speakupmap.h:genmap mapdata.h keyinfo.h makemapdata speakupmap.map + genmap speakupmap.map >speakupmap.h +mapdata.h:makemapdata keyinfo.h + makemapdata >mapdata.h +speakupmain.o:$(speakupmain-objes) ld -r -o speakupmain.o speakup.o speakup_drvcommon.o $(obj)/speakupmap.h: $(src)/speakupmap.map $(src)/genmap