Fix sim module build on MacOS arm64
This commit is contained in:
parent
f007f812df
commit
e393f84799
|
@ -1,9 +1,15 @@
|
||||||
include variables.mak
|
include variables.mak
|
||||||
UNAME_S := $(shell uname -s)
|
UNAME_S := $(shell uname -s)
|
||||||
|
UNAME_M := $(shell uname -m)
|
||||||
|
|
||||||
ifeq ($(UNAME_S),Darwin)
|
ifeq ($(UNAME_S),Darwin)
|
||||||
CFLAGS += -I/usr/local/include/
|
ifeq ($(UNAME_M),x86_64)
|
||||||
LDFLAGS += -L/usr/local/lib
|
CFLAGS += -I/usr/local/include
|
||||||
|
LDFLAGS += -L/usr/local/lib
|
||||||
|
else
|
||||||
|
CFLAGS += -I/opt/homebrew/include
|
||||||
|
LDFLAGS += -L/opt/homebrew/lib
|
||||||
|
endif
|
||||||
LDFLAGS += -lpthread -ljson-c -lz -lm -lstdc++ -ldl -levent
|
LDFLAGS += -lpthread -ljson-c -lz -lm -lstdc++ -ldl -levent
|
||||||
else
|
else
|
||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
|
|
|
@ -4,6 +4,7 @@ UNAME_S := $(shell uname -s)
|
||||||
include $(SRC_DIR)/modules/rules.mak
|
include $(SRC_DIR)/modules/rules.mak
|
||||||
|
|
||||||
CFLAGS += -I$(TAPCFG_DIRECTORY)/src/include
|
CFLAGS += -I$(TAPCFG_DIRECTORY)/src/include
|
||||||
|
LDFLAGS += -lz
|
||||||
OBJS = $(MOD).o tapcfg.o taplog.o
|
OBJS = $(MOD).o tapcfg.o taplog.o
|
||||||
|
|
||||||
$(MOD).so: $(OBJS)
|
$(MOD).so: $(OBJS)
|
||||||
|
|
|
@ -1,12 +1,19 @@
|
||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
UNAME_S := $(shell uname -s)
|
UNAME_S := $(shell uname -s)
|
||||||
|
UNAME_M := $(shell uname -m)
|
||||||
|
|
||||||
ifeq ($(UNAME_S),Darwin)
|
ifeq ($(UNAME_S),Darwin)
|
||||||
CFLAGS += -I/usr/local/include/
|
ifeq ($(UNAME_M),x86_64)
|
||||||
LDFLAGS += -L/usr/local/lib -ljson-c
|
CFLAGS += -I/usr/local/include
|
||||||
CFLAGS += -Wall -O3 -ggdb -fPIC
|
LDFLAGS += -L/usr/local/lib
|
||||||
|
else
|
||||||
|
CFLAGS += -I/opt/homebrew/include
|
||||||
|
LDFLAGS += -L/opt/homebrew/lib
|
||||||
|
endif
|
||||||
|
LDFLAGS += -ljson-c
|
||||||
|
CFLAGS += -Wall -O3 -ggdb -fPIC
|
||||||
else
|
else
|
||||||
CFLAGS += -Wall -O3 -ggdb -fPIC -Werror
|
CFLAGS += -Wall -O3 -ggdb -fPIC -Werror
|
||||||
endif
|
endif
|
||||||
LDFLAGS += -levent -shared -fPIC
|
LDFLAGS += -levent -shared -fPIC
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ UNAME_S := $(shell uname -s)
|
||||||
include $(SRC_DIR)/modules/rules.mak
|
include $(SRC_DIR)/modules/rules.mak
|
||||||
|
|
||||||
CFLAGS += -I$(TAPCFG_DIRECTORY)/src/include
|
CFLAGS += -I$(TAPCFG_DIRECTORY)/src/include
|
||||||
|
LDFLAGS += -lz
|
||||||
OBJS = $(MOD).o tapcfg.o taplog.o
|
OBJS = $(MOD).o tapcfg.o taplog.o
|
||||||
|
|
||||||
$(MOD).so: $(OBJS)
|
$(MOD).so: $(OBJS)
|
||||||
|
|
Loading…
Reference in New Issue