Refactor to use the host triplet instead of CONFIG_TARGET

This commit is contained in:
Hamish Coleman
2023-07-03 02:51:20 +08:00
parent 59ecadcab2
commit 1e8a085f1e
2 changed files with 3 additions and 15 deletions
+2 -14
View File
@@ -38,18 +38,6 @@ ifndef UNAME_S
$(error Could not run uname command, cannot continue)
endif
# Any compile environment that needs different flags, libraries, includes or
# other settings will get its own CONFIG_TARGET value. For cross compiling,
# this might be set externally to the Makefile, but if not set we try to
# set a reasonable default.
export CONFIG_TARGET
ifndef CONFIG_TARGET
ifeq ($(shell uname -o),Msys)
CONFIG_TARGET=mingw
endif
endif
export MKDIR
export INSTALL
export INSTALL_PROG
@@ -152,7 +140,7 @@ LINT_CCODE=\
LDLIBS+=-ln2n
LDLIBS+=$(LDLIBS_EXTRA)
ifeq ($(CONFIG_TARGET),mingw)
ifneq (,$(findstring mingw,$(CONFIG_HOST_OS)))
LDLIBS+=$(abspath win32/n2n_win32.a)
N2N_DEPS+=win32/n2n_win32.a
SUBDIRS+=win32
@@ -216,7 +204,7 @@ src/example_edge_embed_quick_edge_init: $(N2N_LIB)
src/example_sn_embed: $(N2N_LIB)
src/example_edge_embed: $(N2N_LIB)
ifeq ($(CONFIG_TARGET), mingw)
ifneq (,$(findstring mingw,$(CONFIG_HOST_OS)))
src/edge: win32/edge_rc.o
endif
+1 -1
View File
@@ -7,7 +7,7 @@ DEBUG?=-g3
HEADERS=$(wildcard include/*.h)
CFLAGS+=-I../include
ifeq ($(CONFIG_TARGET),mingw)
ifneq (,$(findstring mingw,$(CONFIG_HOST_OS)))
CFLAGS+=-I../win32
endif
CFLAGS+=$(DEBUG)