Anonymous avatar Anonymous committed 7df8f28

Fix tr command for Ubuntu; builds work now

Comments (0)

Files changed (1)

 # and GCC_PREFIX to point to your arm-none-eabi gcc tree.
 # Otherwise it should "just work".
 #
-#PEBBLE_HOME := $(HOME)/build/pebble/sdk
-PEBBLE_HOME := $(HOME)/build/pebble/pebble-sdk-release-001/sdk
-ARM_GCC_PATH := $(HOME)/arm-cs-tools/bin
+
+# TOP is the location with of this build tree
+TOP := $(dir $(lastword $(MAKEFILE_LIST)))
+-include $(TOP)/Makefile.config
+
+# If Makefile.config does not define these, use defaults paths.
+PEBBLE_HOME ?= $(HOME)/pebble-sdk-release-001/sdk
+ARM_GCC_PATH ?= $(HOME)/arm-cs-tools/bin
+
 GCC_PREFIX := $(ARM_GCC_PATH)/arm-none-eabi-
 export PATH := $(ARM_GCC_PATH):$(PATH)
 
 VERSION ?= 0.1
 APP ?= pebble-app
 
-# TOP is the location with of this build tree
-TOP := $(dir $(lastword $(MAKEFILE_LIST)))
-
 # Our custom Pebble library shared with all our watch faces
 LIBPEBBLE_TH := $(TOP)lib/build/libpebble_th.a
 
 
 # Helper macros
 map = $(foreach f,$2,$(call $1,$f))
-uppercase = $(shell echo $1 | tr '[-.a-z]' '[__A-Z]')
+uppercase = $(shell echo $1 | tr -- '-.[:lower:]' '__[:upper:]')
 ucfile = $(call uppercase,$(basename $(notdir $1)))
 
 
 	$(SIZE) $@
 
 $(LIBPEBBLE_TH):
-	$(MAKE) -C $(dir $(LIBPEBBLE_TH))../src
+	$(MAKE) -C $(dir $(TOP)/lib/src
 
 else
 # Libraries do not use resources, but do need to link everything together
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.