Commits

Trammell Hudson committed 15514a9

Start explanation of how to use the Makefile build system

  • Participants
  • Parent commits 17a9cfd

Comments (0)

Files changed (3)

+DIRS += hoelaat
+DIRS += auth
+
+all: $(DIRS)
+
+$(DIRS): FORCE
+	$(MAKE) -C $@/src
+
+clean:
+	for dir in $(DIRS); do \
+		$(MAKE) -C $$dir/src clean; \
+	done
+
+FORCE:
 # 	SRCS with a list of source files.
 #	TARGET := project to build
 #
+# Change PEBBLE_HOME to point to the sdk directory
+# and GCC_PREFIX to point to your arm-none-eabi gcc tree.
+# Otherwise it should "just work".
+#
 PEBBLE_HOME := $(HOME)/build/pebble/sdk
-PYTHON := python
-
 GCC_PREFIX := $(HOME)/arm-cs-tools/bin/arm-none-eabi-
 
 CC := $(GCC_PREFIX)gcc
 LD := $(CC)
 OBJCOPY := $(GCC_PREFIX)objcopy
+PYTHON := python
 
 # If no version is specified, use a default one
 VERSION ?= 0.1
-To generate the links to the SDK for each project:
+This tree is not built with the official Pebble waf scripts.
+Instead each directory has its own Makefile that includes
+the toplevel Makefile from here.
 
-for dir in hoelat auth; do \
-../pebble-sdk-hb001/pebble-apps/tools/create_pebble_project.py \
-	--symlink-only \
-	../sdk \
-	$dir
-done
+The only configuration required is in Makefile.pebble:
+
+1. Set PEBBLE_HOME to point to the sdk directory
+2. Set GCC_PREFIX
+
+You can also run make in each subdirectory to generate the PBW
+files for that subdirectory.
+
+To create a new pebble project, copy a sample Makefile and
+the resource_map.json file (this file is vestigal now).
+
+Fonts and resources need more work; currently they need three lists.
+FONTS, RESOURCE_LIST and the makefile deps for each font.  I plan to
+fix this with some more makefile magic in the Makefile.pebble.
+
+
+Any questions?  Trammell Hudson <hudson@osresearch.net>