Added files
This commit is contained in:
31
gcd/Makefile
Normal file
31
gcd/Makefile
Normal file
@ -0,0 +1,31 @@
|
||||
CXX := g++
|
||||
CFLAGS := -std=c++11 -m64 -Wall -Werror -Wextra -O3
|
||||
|
||||
.PHONY: all
|
||||
all: bin/gcd
|
||||
|
||||
bin:
|
||||
@mkdir -v bin
|
||||
|
||||
bin/gcd: src/gcd.cpp | check-cxx-works bin
|
||||
@echo Compiling $<
|
||||
@${CXX} ${CFLAGS} $^ -o $@
|
||||
|
||||
.PHONY: install
|
||||
install: bin/gcd
|
||||
@cp -v $^ /usr/bin
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall: /usr/bin/gcd
|
||||
@rm -v $^
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@rm -rfv bin
|
||||
|
||||
.PHONY: mrproper
|
||||
mrproper: clean
|
||||
|
||||
.PHONY: check-cxx-works
|
||||
check-cxx-works:
|
||||
@${CXX} --version >/dev/null 2>&1 || (echo 'Please install a C++ compiler.' && exit 1)
|
Reference in New Issue
Block a user