Source

inpulse / Makefile

Full commit
# inPulse compile line:
# arm-none-eabi-gcc \
#	-o build/pulse_app \
#	-I include \
#	-std=gnu99 \
#	-g \
#	-Os \
#	-Wall \
#	-Wno-format \
#	-fno-builtin \
#	-mcpu=arm7tdmi-s \
#	-march=armv4t \
#	-mthumb \
#	-mthumb-interwork \
#	-ffunction-sections \
#	-fdata-sections \
#	-DNDEBUG \
#	-Wno-unused-parameter \
#	-Tlib/obj/firmware.ld \
#	-Wl,--cref \
#	-Wl,--gc-sections \
#	-Wl,-Map=build/pulse_app.map,-\( \
#	lib/libapp_common.a \
#	lib/libbtstack.a \
#	lib/libdebug.a \
#	lib/libkernel.a \
#	lib/libpulse_os.a \
#	lib/libpulse_protocol.a \
#	lib/libpulse_widgets.a \
#	lib/obj/irq.o \
#	lib/obj/kernel_struct.o \
#	src/app.c \
#	src/life.c \
#	src/powersave.c \
#	-lgcc \
#	-Wl,-\) 

MAC	:= 00:50:c2:79:ef:08
CC	:= $(shell which arm-elf-gcc-4.3.2)
LD	:= $(shell which arm-elf-ld)

ARCH_FLAGS := \
	-mcpu=arm7tdmi-s \
	-march=armv4t \
	-mthumb \
	-mthumb-interwork \
	-ffunction-sections \
	-fdata-sections \

CFLAGS	:= \
	$(ARCH_FLAGS) \
	-I ../include \
	-std=gnu99 \
	-g \
	-Os \
	-Wall \
	-Wno-format \
	-fno-builtin \
	-DNDEBUG \
	-DLOCAL_STUBS \
	-Wno-unused-parameter \



LDFLAGS	:= \
	$(ARCH_FLAGS) \
	-nostdlib \

#LIBS-y += libinpulse.a


all: pulse_app.elf

%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $<


OBJS-y += app.o
OBJS-y += life.o
OBJS-y += powersave.o
OBJS-y += swarm.o
OBJS-y += plaid.o
OBJS-y += stubs.o
OBJS-y += sin_table.o

obj: $(OBJS-y)

pulse_app.elf: $(OBJS-y)
	$(LD) \
		$(LD_FLAGS) \
		-o $@ \
		$^ \
		$(LIBS-y)


FONT_FILE := ../resources/fonts.txt

$(FONT_FILE): fonts.txt
	cp $< $@

resources: ../resources/inpulse_resources.bin
../resources/inpulse_resources.bin: ../resources/fonts.txt
	cd .. ; python tools/resource_packer/resource_packer.py  

install-resources:
	cd .. ; python ./compileandload.py \
		-d $(MAC) \
		-r \
		-f ./resources/inpulse_resources.bin \

install: resources
	cd .. ; python ./compileandload.py \
		-d $(MAC) \

install-both: resources
	cd .. ; python ./compileandload.py \
		-f ./resources/inpulse_resources.bin \
		-d $(MAC) \

server:
	cd .. ; java -d32 -jar ./tools/L2CAPServer/L2CAPServer.jar


clean:
	$(RM) *.o *.a core *.elf