make win32/MSYS compatible

pull/43/head
Pengo Wray 2024-06-09 19:19:32 +10:00
rodzic 50ee0c0636
commit a8d400187f
5 zmienionych plików z 35 dodań i 3 usunięć

3
.gitignore vendored
Wyświetl plik

@ -6,4 +6,5 @@ wsjtx2/
.build/
.DS_Store
.vscode/
__pycache__/
__pycache__/
*.exe

Wyświetl plik

@ -1,5 +1,7 @@
BUILD_DIR = .build
USE_ASAN = 1 # Set to 1 to enable AddressSanitizer
FT8_SRC = $(wildcard ft8/*.c)
FT8_OBJ = $(patsubst %.c,$(BUILD_DIR)/%.o,$(FT8_SRC))
@ -11,9 +13,14 @@ FFT_OBJ = $(patsubst %.c,$(BUILD_DIR)/%.o,$(FFT_SRC))
TARGETS = gen_ft8 decode_ft8 test_ft8
CFLAGS = -fsanitize=address -O3 -ggdb3
CFLAGS = -D_GNU_SOURCE -O3 -ggdb3
CPPFLAGS = -std=c11 -I.
LDFLAGS = -fsanitize=address -lm
LDFLAGS = -lm
ifeq ($(USE_ASAN), 1)
CFLAGS += -fsanitize=address
LDFLAGS += -fsanitize=address
endif
# Optionally, use Portaudio for live audio input
ifdef PORTAUDIO_PREFIX

Wyświetl plik

@ -17,6 +17,10 @@
#define LOG_LEVEL LOG_INFO
#include <ft8/debug.h>
#ifdef _WIN32
#define gmtime_r(timep, result) gmtime_s(result, timep)
#endif
const int kMin_score = 10; // Minimum sync score threshold for candidates
const int kMax_candidates = 140;
const int kLDPC_iterations = 25;

Wyświetl plik

@ -10,6 +10,16 @@
#define NTOKENS ((uint32_t)2063592ul)
#define MAXGRID4 ((uint16_t)32400ul)
#ifndef HAVE_STPCPY
#define HAVE_STPCPY
static char *stpcpy(char *dest, const char *src) {
strcpy(dest, src);
return dest + strlen(src);
}
#endif
////////////////////////////////////////////////////// Static function prototypes //////////////////////////////////////////////////////////////
static bool trim_brackets(char* result, const char* original, int length);

Wyświetl plik

@ -15,6 +15,16 @@
#define LOG_LEVEL LOG_INFO
#include "ft8/debug.h"
#ifndef HAVE_STPCPY
#define HAVE_STPCPY
static char *stpcpy(char *dest, const char *src) {
strcpy(dest, src);
return dest + strlen(src);
}
#endif
// void convert_8bit_to_6bit(uint8_t* dst, const uint8_t* src, int nBits)
// {
// // Zero-fill the destination array as we will only be setting bits later