pubsubc/Makefile

33 lines
598 B
Makefile
Raw Normal View History

2020-11-12 16:51:32 +01:00
# Makefile - A simple client for MQTT in C
# Wolfgang Hottgenroth <woho@hottis.de>
# https://home.hottis.de/gitlab/wolutator/pubsubc
2020-11-20 11:12:36 +01:00
CFLAGS?=-mcpu=cortex-m3 -mthumb -Og -fdata-sections -ffunction-sections -g -gdwarf-2 -Wall -Werror
2020-11-12 16:51:32 +01:00
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 platformAdaption.o)
2020-11-12 16:51:32 +01:00
all: $(OBJS)
2020-11-12 16:57:46 +01:00
$(AR) rcs pubsubc.a $^
2020-11-12 16:51:32 +01:00
$(OBJDIR)/%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
$(OBJS): | $(OBJDIR)
$(OBJDIR):
mkdir $(OBJDIR)
.PHONY: clean
clean:
2020-11-12 16:57:46 +01:00
-rm -rf $(OBJDIR) pubsubc.a