From 8db71e5eb4fc6ef4bb4b1f99f5e406dedc9e9e89 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Sat, 7 Nov 2020 20:53:45 +0100 Subject: [PATCH] add Makefile --- Makefile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4534c90 --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ +CC=arm-none-eabi-gcc + +CFLAGS=-iquote Ethernet -iquote Application -iquote Internet -Wall + +OBJDIR=build +VPATH=Ethernet:Ethernet/W5500:Internet/DHCP:Internet/DNS:Internet/MQTT:Internet/MQTT/MQTTPacket/src:Internet/httpServer:Internet/SNTP + +OBJS=$(addprefix $(OBJDIR)/,wizchip_conf.o socket.o w5500.o \ + dhcp.o \ + dns.o \ + httpParser.o httpServer.o httpUtil.o \ + sntp.o \ + MQTTConnectClient.o MQTTConnectServer.o MQTTDeserializePublish.o MQTTFormat.o MQTTPacket.o MQTTSerializePublish.o MQTTSubscribeClient.o MQTTSubscribeServer.o \ + MQTTUnsubscribeClient.o MQTTUnsubscribeServer.o \ + mqtt_interface.o MQTTClient.o \ +) + + + + +all: $(OBJS) + ls $^ + +$(OBJDIR)/%.o: %.c + $(CC) $(CFLAGS) -c $< -o $@ + +$(OBJS): | $(OBJDIR) + +$(OBJDIR): + mkdir $(OBJDIR) + +.PHONY: clean +clean: + -rm -rf $(OBJDIR)