📜  如何为 makefile 安装规则 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:41.464000             🧑  作者: Mango

代码示例1
PREFIX = /usr/local

.PHONY: install
install: mygame
    mkdir -p $(DESTDIR)$(PREFIX)/bin
    cp $< $(DESTDIR)$(PREFIX)/bin/mygame

.PHONY: uninstall
uninstall:
    rm -f $(DESTDIR)$(PREFIX)/bin/mygame