diff options
author | Paul Kocialkowski | 2016-11-21 22:13:39 +0100 |
---|---|---|
committer | Paul Kocialkowski | 2016-11-22 13:27:38 +0100 |
commit | 76bc9028e9585a06717bb051ec72612e57b88b52 (patch) | |
tree | 4e07e48590702f1208f69d8bc57e6ed857136a07 /Makefile |
Canard include file and compiler initial commit
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 36 |
1 files changed, 36 insertions, 0 deletions
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)) |