Files
fail/bochs/host/linux/pcidev/Makefile.in
hsc b70b6fb43a another directory rename: failstar -> fail
"failstar" sounds like a name for a cruise liner from the 80s.  As "*" isn't a
desirable part of directory names, just name the whole thing "fail/", the core
parts being stored in "fail/core/".

Additionally fixing two build system dependency issues:
 - missing jobserver -> protomessages dependency
 - broken bochs -> fail dependency (add_custom_target DEPENDS only allows plain
   file dependencies ... cmake for the win)


git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@956 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-03-08 19:43:02 +00:00

76 lines
1.5 KiB
Makefile

ifneq ($(KERNELRELEASE), )
# linux kernel 2.6 kbuild invocation
include $(src)/Make.kbuild
else
# command prompt invocation or linux kernel 2.4 build
KERNELDIR = @KERNELDIR@
CC = @CC@
LSMOD = @LSMOD@
INSMOD = @INSMOD@
RMMOD = @RMMOD@
DEPMOD = @DEPMOD@
KERNEL_MODULE_SUFFIX = @KERNEL_MODULE_SUFFIX@
MODULE_NAME = pcidev
MODULE_FILE = $(MODULE_NAME).$(KERNEL_MODULE_SUFFIX)
PCIDEV_MODULE_MAKE_ALL = @PCIDEV_MODULE_MAKE_ALL@
CFLAGS = -Wstrict-prototypes -Wno-trigraphs -g -fno-strict-aliasing -fno-common -D__KERNEL__ -DMODULE -I$(KERNELDIR)/include -O -Wall
.PHONY : all
all : $(PCIDEV_MODULE_MAKE_ALL)
.PHONY : all-kernel24
all-kernel24 : $(MODULE_FILE)
$(MODULE_FILE) : pcidev.c kernel_pcidev.h
.PHONY : all-kernel26
all-kernel26 :
$(MAKE) -C $(KERNELDIR) SUBDIRS=$(shell pwd) modules
.PHONY : clean
clean :
@RMCOMMAND@ *.o *~ core *.mod.* .*.cmd *.ko
.PHONY : dist-clean
dist-clean: clean
@RMCOMMAND@ Makefile
.PHONY : devices
devices:
@DEVICE="/dev/pcidev" ; \
if test \! -c $$DEVICE ; then \
echo "Adding $$DEVICE ..." ; \
mknod $$DEVICE c 240 0 ; \
chmod a+wr $$DEVICE ; \
ls -l $$DEVICE ; \
else \
echo "Device $$DEVICE already exists." ; \
fi
# works only under linux of course
.PHONY : install
install:
@if test $$USER != "root" ; then \
echo "Only root can install." ; \
exit 1 ; \
fi ; \
if $(LSMOD) | grep -q $(MODULE_NAME) ; then \
echo "Unloading $(MODULE_NAME) ..." ; \
$(RMMOD) $(MODULE_NAME) ; \
fi ; \
echo "Loading $(MODULE_NAME) ..." ; \
$(INSMOD) $(MODULE_FILE) ; \
echo "Done."
endif