Skip to content

Instantly share code, notes, and snippets.

@jlgerber
Created May 31, 2019 12:00
Show Gist options
  • Save jlgerber/0f280236c2ee1b741dfe41a38d39a467 to your computer and use it in GitHub Desktop.
Save jlgerber/0f280236c2ee1b741dfe41a38d39a467 to your computer and use it in GitHub Desktop.
simple makefile for rust projects
prog :=xnixperms
debug ?=
$(info debug is $(debug))
ifdef debug
release :=
target :=debug
extension :=debug
else
release :=--release
target :=release
extension :=
endif
build:
cargo build $(release)
install:
cp target/$(target)/$(prog) ~/bin/$(prog)-$(extension)
all: build install
help:
@echo "usage: make $(prog) [debug=1]"
@adrianboston
Copy link

perhaps test. otherwise cheers and stay outta debt

@ttaqinmu
Copy link

looks good and clean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment