mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-16 08:29:15 +01:00
Merge pull request #42 from parched/add_config
Added option for config file.
This commit is contained in:
commit
4efb8cd5c7
4
.gitignore
vendored
4
.gitignore
vendored
@ -3,6 +3,10 @@
|
||||
/tools
|
||||
/build
|
||||
/3rdparty
|
||||
|
||||
# Ignore user config
|
||||
config
|
||||
|
||||
|
||||
# Exclude temporary and system files
|
||||
Thumbs.db
|
||||
|
35
Makefile
35
Makefile
@ -60,10 +60,10 @@ smallify = $(subst $(SPACE),-,$(call lc,$1))
|
||||
|
||||
# Naming for binaries and packaging etc,.
|
||||
ORG_BIG_NAME := LibrePilot
|
||||
GCS_BIG_NAME := ${ORG_BIG_NAME} GCS
|
||||
GCS_BIG_NAME = ${ORG_BIG_NAME} GCS
|
||||
# These should be lowercase with no spaces
|
||||
ORG_SMALL_NAME := $(call smallify,$(ORG_BIG_NAME))
|
||||
GCS_SMALL_NAME := $(call smallify,$(GCS_BIG_NAME))
|
||||
ORG_SMALL_NAME = $(call smallify,$(ORG_BIG_NAME))
|
||||
GCS_SMALL_NAME = $(call smallify,$(GCS_BIG_NAME))
|
||||
|
||||
# Set up default build configurations (debug | release)
|
||||
GCS_BUILD_CONF := release
|
||||
@ -140,6 +140,9 @@ else ifeq ($(UNAME), Windows)
|
||||
UAVOBJGENERATOR = $(BUILD_DIR)/uavobjgenerator/uavobjgenerator.exe
|
||||
endif
|
||||
|
||||
CONFIG_FILE := config
|
||||
-include $(CONFIG_FILE)
|
||||
|
||||
##############################
|
||||
#
|
||||
# All targets
|
||||
@ -842,6 +845,27 @@ $(DIST_NAME).gz: $(DIST_VER_INFO) .git/index | $(DIST_DIR)
|
||||
dist: $(DIST_NAME).gz
|
||||
|
||||
|
||||
##############################
|
||||
#
|
||||
# Config
|
||||
#
|
||||
##############################
|
||||
|
||||
CONFIG_OPTS := $(subst $(SPACE),\n,$(MAKEOVERRIDES))
|
||||
|
||||
.PHONY: config_new
|
||||
config_new:
|
||||
@echo -e '$(CONFIG_OPTS)' > $(CONFIG_FILE)
|
||||
|
||||
.PHONY: config_append
|
||||
config_append:
|
||||
@echo -e '$(CONFIG_OPTS)' >> $(CONFIG_FILE)
|
||||
|
||||
.PHONY: config_clean
|
||||
config_clean:
|
||||
rm -f $(CONFIG_FILE)
|
||||
|
||||
|
||||
##############################
|
||||
#
|
||||
# Directories
|
||||
@ -993,6 +1017,11 @@ help:
|
||||
@$(ECHO) " docs_<source>_clean - Delete generated documentation for <source>"
|
||||
@$(ECHO) " docs_all_clean - Delete all generated documentation"
|
||||
@$(ECHO)
|
||||
@$(ECHO) " [Configuration]"
|
||||
@$(ECHO) " config_new - Place your make arguments in the config file"
|
||||
@$(ECHO) " config_append - Place your make arguments in the config file but append"
|
||||
@$(ECHO) " config_clean - Removes the config file"
|
||||
@$(ECHO)
|
||||
@$(ECHO) " Hint: Add V=1 to your command line to see verbose build output."
|
||||
@$(ECHO)
|
||||
@$(ECHO) " Notes: All tool distribution files will be downloaded into $(DL_DIR)"
|
||||
|
Loading…
x
Reference in New Issue
Block a user