Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Makefile « clovercon - github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5f58495562613aab72eb5bfedaead4d24f20c3f8 (plain)
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
CURRENT = $(shell uname -r)
HMOD = ../mods/hmods/clovercon.hmod
TARGET  = clovercon
TARGET_PATH = mod/lib/modules/3.4.112/extra
TARGET  = clovercon
OBJS    = clovercon.o
KDIR    = ~/nesmini-linux
PWD = $(shell pwd)
DEST = .

obj-m      := $(TARGET).o

all:
	make -C $(KDIR) SUBDIRS=$(PWD) ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
	modinfo $(TARGET).ko
	arm-linux-gnueabihf-strip --strip-unneeded $(TARGET).ko
	cp -f $(TARGET).ko $(TARGET_PATH)/$(TARGET).ko
	cd mod && tar -czvf ../$(HMOD) *

$(TARGET).o: $(OBJS)
	$(LD) $(LD_RFLAG) ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -r -o $@ $(OBJS)

clean:
	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean
	rm -f $(TARGET_PATH)/$(TARGET).ko $(HMOD)

.PHONY: modules clean

-include $(KDIR)/Rules.make