mirror of
https://github.com/xvxx/phd
synced 2024-11-04 18:00:22 +00:00
Simple Makefile
This commit is contained in:
parent
e2412c7185
commit
aab613ec15
37
Makefile
Normal file
37
Makefile
Normal file
@ -0,0 +1,37 @@
|
||||
# Simple, stupid makefile to make phd
|
||||
|
||||
TARGET = phd
|
||||
RELEASE = target/release/$(TARGET)
|
||||
DEBUG = target/debug/$(TARGET)
|
||||
SOURCES = $(wildcard src/*.rs src/**/*.rs)
|
||||
PREFIX = $(DESTDIR)/usr/local
|
||||
BINDIR = $(PREFIX)/bin
|
||||
|
||||
.PHONY: release debug install uninstall clean
|
||||
|
||||
# Default target. Build release binary.
|
||||
release: $(RELEASE)
|
||||
|
||||
# Binary with debugging info.
|
||||
debug: $(DEBUG)
|
||||
|
||||
# Install locally.
|
||||
install: $(RELEASE)
|
||||
install $(RELEASE) $(BINDIR)/$(TARGET)
|
||||
|
||||
# Uninstall locally.
|
||||
uninstall: $(RELEASE)
|
||||
-rm $(BINDIR)/$(TARGET)
|
||||
|
||||
# Remove build directory.
|
||||
clean:
|
||||
-rm -rf target
|
||||
|
||||
# Build and strip the release version
|
||||
$(RELEASE): $(SOURCES)
|
||||
cargo build --release
|
||||
strip $@
|
||||
|
||||
# Build the debug version
|
||||
$(DEBUG): $(SOURCES)
|
||||
cargo build
|
Loading…
Reference in New Issue
Block a user