ifeq ($(PATCHLEVEL),) # compile in kqemu directory -include ../config-host.mak ifdef CONFIG_KBUILD26 # 2.6 build all: kqemu.ko kqemu.ko: make -C $(KERNEL_PATH) M=`pwd` modules else # 2.4 build all: kqemu.o kqemu.o: make -C $(KERNEL_PATH) SUBDIRS=`pwd` modules endif # !CONFIG_KBUILD26 clean: rm -f kqemu.o kqemu.ko kqemu-linux.o kqemu-mod.o kqemu.mod.c *~ FILES=Makefile README Changelog LICENSE install.sh kqemu-linux.c kqemu.h \ kqemu-kernel.h kqemu-mod-i386.o kqemu-mod-x86_64.o \ kqemu-freebsd.c Makefile.freebsd \ kqemu-win32.c kqemu.sys kqemu.inf kqemu-mod-i386-win32.o Makefile.winnt \ kqemu-doc.texi kqemu-doc.html VERSION=0.7.2 tar: cd .. ; tar zcvf /tmp/kqemu-$(VERSION).tar.gz $(addprefix kqemu/, $(FILES)) # documentation doc: kqemu-doc.html %.html: %.texi texi2html -monolithic -number $< else ifeq ($(PATCHLEVEL),4) # called from 2.4 kernel kbuild obj-m:= kqemu.o kqemu-objs:= kqemu-linux.o kqemu-mod-$(ARCH).o include $(TOPDIR)/Rules.make kqemu.o: $(kqemu-objs) $(LD) -r -o $@ $(kqemu-objs) else # called from 2.6 kernel kbuild obj-m:= kqemu.o kqemu-objs:= kqemu-linux.o kqemu-mod.o $(obj)/kqemu-mod.o: $(src)/kqemu-mod-$(ARCH).o cp $< $@ endif endif # PATCHLEVEL