From 76bc9028e9585a06717bb051ec72612e57b88b52 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Mon, 21 Nov 2016 22:13:39 +0100 Subject: Canard include file and compiler initial commit Signed-off-by: Paul Kocialkowski --- Makefile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b94eb6e --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +# Tools + +CC = gcc +INSTALL = install + +# Project + +NAME = code + +# Directories + +BIN = bin +INCLUDE = include +PREFIX ?= /usr/local + +# Sources + +SOURCES_BIN = canardcc +SOURCES_INCLUDE = canard.h + +# Produced files + +INSTALL_BIN = $(PREFIX)/bin +INSTALL_INCLUDE = $(PREFIX)/include +OUTPUT_DIRS = $(sort $(dir $(INSTALL_BIN)) $(dir $(INSTALL_INCLUDE))) + +all: install + +$(OUTPUT_DIRS): + $(foreach dir,$(OUTPUT_DIRS),install -d $(dir)) + +.PHONY: install +install: $(OUTPUT_DIRS) + @echo " INSTALL" + $(foreach source,$(SOURCES_BIN),@install $(BIN)/$(source) $(INSTALL_BIN)/$(source)) + $(foreach source,$(SOURCES_INCLUDE),@install $(INCLUDE)/$(source) $(INSTALL_INCLUDE)/$(source)) -- cgit v1.2.3