Attempt to fix build

This commit is contained in:
Jacob Eva 2025-08-05 18:41:10 +01:00
parent 77a0530e41
commit 74d4c3ea05

View File

@ -1,37 +1,40 @@
CC = gcc # Copyright (c) 2025 Jacob Eva (Liberated Embedded Systems)
CFLAGS = -Wall -O2 -I. -DWIN32 # This program is free software: you can redistribute it and/or modify it
BIN = UartSecureDFU # under the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <https://www.gnu.org/licenses/>.
DEPS = crc32.h \ # This makefile is for GNU / Linux.
delay_connect.h \
dfu.h \
dfu_serial.h \
logging.h \
slip_enc.h \
uart_drv.h \
uart_slip.h \
zip.h \
miniz.h \
jsmn.h \
Makefile
OBJS = crc32.o \ CC=gcc
delay_connect.o \ CFLAGS=-DLOG_USE_COLOR -Wall -O2 -I. -DWIN32 -l crypto
dfu.o \ LIB=librnode
dfu_serial.o \ SRCS=$(shell dir /b /s *.c *.h | findstr /v /i "\_linux.c$")
jsmn.o \ OBJS=$(patsubst %.c,%.o,$(SRCS))
logging.o \ F_OBJS=$(notdir $(OBJS))
slip_enc.o \
uart_win32.o \
UartSecureDFU.o \
uart_slip.o \
zip.o
%.o: %.c $(DEPS) all: $(OBJS)
$(CC) $(CFLAGS) -c $< -o $@ ar cr build/$(LIB).a -o $(F_OBJS)
mv *.o build
$(BIN): $(OBJS) %.o: %.c
$(CC) $(OBJS) -o $(BIN) $(CC) $(FLAGS) $< -c
clean: debug: FLAGS+=-g
rm -f $(BIN) $(OBJS) debug: all
test: all
$(CC) tests/test.c -L build -l rnode -l tap -l crypto -l md -o build/librnode_test
test-debug: debug
$(CC) tests/test.c -L build -l rnode -l tap -l crypto -l md -g -o build/librnode_test
clean:
- rm -rf build
- mkdir build