39 lines
1.2 KiB
Makefile
39 lines
1.2 KiB
Makefile
|
BUILD_DIR=.build
|
||
|
|
||
|
all: kernel qemu
|
||
|
|
||
|
kernel: kernel.build
|
||
|
cp $(BUILD_DIR)/kernel/*.deb $(BUILD_DIR)
|
||
|
|
||
|
qemu:
|
||
|
cp $(BUILD_DIR)/qemu/*.deb $(BUILD_DIR)
|
||
|
|
||
|
kernel.build: kernel.prepare
|
||
|
cd $(BUILD_DIR)/kernel && make clean deb
|
||
|
|
||
|
qemu.build: kernel.prepare
|
||
|
cd $(BUILD_DIR)/qemu && make clean deb
|
||
|
|
||
|
|
||
|
kernel.prepare: | submodule
|
||
|
mkdir -p $(BUILD_DIR)/kernel/patches
|
||
|
ln -sf $$(readlink -f submodules/pve-kernel/debian) $(BUILD_DIR)/kernel/
|
||
|
ln -sf $$(readlink -f submodules/pve-kernel/submodules) $(BUILD_DIR)/kernel/
|
||
|
ln -sf $$(readlink -f submodules/pve-kernel/Makefile) $(BUILD_DIR)/kernel/
|
||
|
cp -r submodules/pve-kernel/patches/* $(BUILD_DIR)/kernel/patches
|
||
|
cp -r patches/kernel/* $(BUILD_DIR)/kernel/patches/kernel
|
||
|
|
||
|
qemu.prepare: | submodule
|
||
|
mkdir -p $(BUILD_DIR)/qemu/debian/
|
||
|
ln -sf $$(readlink -f submodules/pve-qemu/qemu) $(BUILD_DIR)/qemu/
|
||
|
ln -sf $$(readlink -f submodules/pve-qemu/Makefile) $(BUILD_DIR)/qemu/
|
||
|
cp -r submodules/pve-qemu/debian/* $(BUILD_DIR)/qemu/debian
|
||
|
cp -r patches/qemu/* $(BUILD_DIR)/qemu/debian/patches/pve
|
||
|
|
||
|
.PHONY: submodule
|
||
|
submodule:
|
||
|
git submodule update --init --recursive
|
||
|
|
||
|
.PHONY: clean
|
||
|
clean:
|
||
|
rm -rf $(BUILD_DIR)
|