File: Makefile

package info (click to toggle)
omfs 0.8.0-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 144 kB
  • ctags: 160
  • sloc: ansic: 1,364; makefile: 100
file content (43 lines) | stat: -rw-r--r-- 762 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#
# Makefile for OMFS filesystem.
#

VERSION=0.8.0
DISTNAME=omfs-$(VERSION)
DISTFILES=*.[ch] Makefile README COPYING ChangeLog omfs.txt

ifneq ($(KERNELRELEASE),)

	obj-m := omfs.o
	omfs-objs := inode.o dir.o file.o bitmap.o

else

	KERNELDIR ?= /lib/modules/$(shell uname -r)/build
	PWD	:= $(shell pwd)

default: modules

modules:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules

modules_install:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
	depmod -a

clean:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) clean

dist: clean
	mkdir $(DISTNAME)
	cp $(DISTFILES) $(DISTNAME)
	tar czvf $(DISTNAME).tar.gz $(DISTNAME)
	$(RM) -r $(DISTNAME)

distcheck: dist
	mkdir build
	cd build && tar xzvf ../$(DISTNAME).tar.gz && \
	cd $(DISTNAME) && $(MAKE) modules
	$(RM) -r build

endif