File: Makefile

package info (click to toggle)
martian-modem 20080625-2
  • links: PTS
  • area: non-free
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 1,048 kB
  • ctags: 985
  • sloc: ansic: 6,095; sh: 298; makefile: 236
file content (33 lines) | stat: -rw-r--r-- 713 bytes parent folder | download | duplicates (2)
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
KRELEASE = $(shell uname -r)
ifdef  KERNEL_DIR
KBUILD_DIR = $(KERNEL_DIR)
else
KBUILD_DIR = /lib/modules/$(KRELEASE)/build
endif
MSRC_DIR = $(shell pwd)

martian_cppflags = -DKMARTIAN_STAMP=20080620
EXTRA_CFLAGS	+= $(martian_cppflags)
ccflags-y	+= $(martian_cppflags)

# kbuild
martian_dev-objs = martian.o marsio.o mfifo.o
obj-m = martian_dev.o

all: modules

modules:
	$(MAKE) -C $(KBUILD_DIR) M="$(MSRC_DIR)"  modules

clean:
	$(MAKE) -C $(KBUILD_DIR) M="$(MSRC_DIR)" clean

install:
	$(MAKE) -C $(KBUILD_DIR) M="$(MSRC_DIR)" modules_install
	if ! /sbin/modprobe -nq martian_dev ; then /sbin/depmod -a; fi
#

# dependencies 
martian.o: martian_ids.c marsio.h ../martian.h
martian_dev-objs: kmartian.h mfifo.h