-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.common
36 lines (28 loc) · 861 Bytes
/
Makefile.common
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
SRC_DIR = $(CORE_DIR)/src
LIBRETRO_DIR = $(SRC_DIR)/libretro
QUICKJS_SRC_DIR = $(SRC_DIR)/quickjs-ng
INCFLAGS := \
-I$(SRC_DIR) \
-I$(LIBRETRO_DIR)/include \
-I$(QUICKJS_SRC_DIR)
ifneq (,$(findstring msvc2003,$(platform)))
INCFLAGS += -I$(LIBRETRO_DIR)/include/compat/msvc
endif
COREDEFINES = \
-D__LIBRETRO__
SOURCES_CXX := $(foreach dir,$(SRC_DIR),$(wildcard $(dir)/*.cpp))
CXXFLAGS += -DUSE_PRECOMPILED_BUNDLE
SOURCES_C += \
$(QUICKJS_SRC_DIR)/quickjs.c \
$(QUICKJS_SRC_DIR)/libbf.c \
$(QUICKJS_SRC_DIR)/libregexp.c \
$(QUICKJS_SRC_DIR)/libunicode.c \
$(QUICKJS_SRC_DIR)/cutils.c \
$(QUICKJS_SRC_DIR)/quickjs-libc.c
CFLAGS += -D_GNU_SOURCE -DCONFIG_VERSION=\"2024-01-13\"
# Add pthread to everything but msvc
ifeq (,$(findstring msvc,$(platform)))
CXXFLAGS += -lpthread
CFLAGS += -lpthread
LDFLAGS += -lpthread -ldl
endif