| summaryrefslogtreecommitdiff |
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2018-09-27 15:40:30 +0200 |
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2018-09-27 15:40:30 +0200 |
| commit | 2f22e667fbea56884d74ed27777f2e9f3fc9fd53 (patch) | |
| tree | 75300c58cc7b287993887f84b2d68b9d515a9ec0 /Makefile | |
| parent | 486ee1dbe21be962e89f421e1dd5f3cbb2fd2177 (diff) | |
Starting to separate background and popup code.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 29 |
1 files changed, 17 insertions, 12 deletions
@@ -1,18 +1,15 @@ ################################################################################ ## CONFIG ###################################################################### ################################################################################ -SRC_DIR ?= src -WWW_DIR ?= www -WWW_SCRIPT_DIR ?= $(WWW_DIR)/script +MODULES ?= background popup -ELM_CC ?= elm-make --warn - -MAIN_MODULE ?= $(SRC_DIR)/Main.elm +SRC_DIR ?= ${CURDIR}/src +WWW_DIR ?= ${CURDIR}/www ################################################################################ ## MAKEFILE MAGIC ############################################################## ################################################################################ -SUB_MODULES = $(shell find $(SRC_DIR) -type f | grep "elm$$") +MODULES_SRC = $(addprefix $(SRC_DIR)/,$(MODULES)) ################################################################################ ## SANITY CHECKS ############################################################### @@ -21,16 +18,24 @@ SUB_MODULES = $(shell find $(SRC_DIR) -type f | grep "elm$$") ################################################################################ ## TARGET RULES ################################################################ ################################################################################ -build: $(WWW_SCRIPT_DIR)/main.js +all: build + +build: + for module in $(MODULES_SRC) ; do \ + $(MAKE) -C $$module build ; \ + done clean: - rm -f $(WWW_SCRIPT_DIR)/main.js + for module in $(MODULES_SRC) ; do \ + $(MAKE) -C $$module clean ; \ + done reset: - rm -rf elm-stuff + $(MAKE) clean + for module in $(MODULES_SRC) ; do \ + $(MAKE) -C $$module reset; \ + done ################################################################################ ## INTERNAL RULES ############################################################## ################################################################################ -$(WWW_SCRIPT_DIR)/main.js: $(MAIN_MODULE) $(SUB_MODULES) - $(ELM_CC) $(MAIN_MODULE) --output $@ |


