From cefa6b7569428188b39816d9b8dca3845d3007c8 Mon Sep 17 00:00:00 2001 From: cnlohr <lohr85@gmail.com> Date: Wed, 28 Jun 2023 05:10:17 -0400 Subject: [PATCH] Fix minichlink compile. --- minichlink/Makefile | 6 +++--- minichlink/funconfig.h | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 minichlink/funconfig.h diff --git a/minichlink/Makefile b/minichlink/Makefile index 964341c..8f215a1 100644 --- a/minichlink/Makefile +++ b/minichlink/Makefile @@ -1,6 +1,6 @@ TOOLS:=minichlink minichlink.so -CFLAGS:=-O0 -g3 -Wall +CFLAGS:=-O0 -g3 -Wall -I. C_S:=minichlink.c pgm-wch-linke.c pgm-esp32s2-ch32xx.c nhc-link042.c ardulink.c serial_dev.c pgm-b003fun.c minichgdb.c # General Note: To use with GDB, gdb-multiarch @@ -9,7 +9,7 @@ C_S:=minichlink.c pgm-wch-linke.c pgm-esp32s2-ch32xx.c nhc-link042.c ardulink.c ifeq ($(OS),Windows_NT) LDFLAGS:=-L. -lpthread -lusb-1.0 -lsetupapi -lws2_32 - CFLAGS:=-Os -s -Wall -D_WIN32_WINNT=0x0600 + CFLAGS:=-Os -s -Wall -D_WIN32_WINNT=0x0600 -I. TOOLS:=minichlink.exe else OS_NAME := $(shell uname -s | tr A-Z a-z) @@ -18,7 +18,7 @@ else endif ifeq ($(OS_NAME),darwin) LDFLAGS:=-lpthread -lusb-1.0 -framework CoreFoundation -framework IOKit - CFLAGS:=-O0 -Wall -Wno-asm-operand-widths -Wno-deprecated-declarations -Wno-deprecated-non-prototype -D__MACOSX__ + CFLAGS:=-O0 -Wall -Wno-asm-operand-widths -Wno-deprecated-declarations -Wno-deprecated-non-prototype -D__MACOSX__ -I. INCLUDES:=$(shell pkg-config --cflags-only-I libusb-1.0) LIBINCLUDES:=$(shell pkg-config --libs-only-L libusb-1.0) INCS:=$(INCLUDES) $(LIBINCLUDES) diff --git a/minichlink/funconfig.h b/minichlink/funconfig.h new file mode 100644 index 0000000..92957a2 --- /dev/null +++ b/minichlink/funconfig.h @@ -0,0 +1,7 @@ +#ifndef _FUNCONFIG_H +#define _FUNCONFIG_H + +#define MINICHLINK 1 + +#endif + -- GitLab