first sources
This commit is contained in:
33
Makefile
Normal file
33
Makefile
Normal file
@ -0,0 +1,33 @@
|
||||
# Makefile - A simple client for MQTT in C
|
||||
# Derived from the PubSubClient from Nick O'Leary
|
||||
# Wolfgang Hottgenroth <woho@hottis.de>
|
||||
# https://home.hottis.de/gitlab/wolutator/pubsubc
|
||||
|
||||
|
||||
|
||||
CFLAGS?=-mcpu=cortex-m3 -mthumb -Og -fdata-sections -ffunction-sections -g -gdwarf-2
|
||||
|
||||
CC=arm-none-eabi-gcc
|
||||
AR=arm-none-eabi-ar
|
||||
|
||||
CFLAGS+=-I../ioLibrary_Driver/Ethernet -Isrc
|
||||
|
||||
OBJDIR=build
|
||||
VPATH=src
|
||||
|
||||
OBJS=$(addprefix $(OBJDIR)/,pubsubc.o client.o)
|
||||
|
||||
all: $(OBJS)
|
||||
$(AR) rcs pubsub.a $^
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(OBJS): | $(OBJDIR)
|
||||
|
||||
$(OBJDIR):
|
||||
mkdir $(OBJDIR)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-rm -rf $(OBJDIR)
|
Reference in New Issue
Block a user