Makefile for OpenTherm firmware

This Forum is about the Opentherm gateway (OTGW) from Schelte

Moderator: hvxl

Post Reply
dirkx@webweaving.org
Starting Member
Starting Member
Posts: 14
Joined: Sat Jan 04, 2014 9:49 pm

Makefile for OpenTherm firmware

Post by dirkx@webweaving.org »

As requested on IRC below is the Makefile I am using to compile the assembler with either MPLABX or a normal AS.

Dw.

Code: Select all

# Makefile / openterm gateway
#
# (c) 2014 Dirk-Willem van Gulik <dirkx(at)webweaving(dot)org>
#     Available under the license.txt of the OpenTerm Gateway
#     software or any version of the Apache Software License.
#

MPLABX=/Applications/microchip/mplabx/mpasmx/

CPU=16F88

ASFLAGS+=-p$(CPU) -q
LDFLAGS+=-p$(CPU) -w -q

AS=${MPLABX}mpasmx
LD=$(MPLABX)mplink

ALL=gateway.o ds1820.o selfprog.o
TARGET=gateway

%.o: %.asm
	$(AS) $(ASFLAGS) -o"$@" "$<"

$(TARGET): $(ALL)
	$(LD) $(LDFLAGS) 16f88.lkr $(ALL) -m$@.map -o$@.cof

all: gateway

clean:
	rm -f *.o *.ERR *.LST *.O *.out  *.cof

distclean: clean
	rm -f $(TARGET).hex

Post Reply

Return to “Opentherm Gateway Forum”