forked from panda-re/panda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
panda.mak
43 lines (30 loc) · 1.76 KB
/
panda.mak
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
37
38
39
40
41
42
include ../../config-host.mak
include $(SRC_PATH)/$(TARGET_DIR)/config-devices.mak
include $(SRC_PATH)/$(TARGET_DIR)/config-target.mak
include $(SRC_PATH)/rules.mak
#ifneq ($(HWDIR),)
#include $(HWDIR)/config.mak
#endif
PLUGIN_TARGET_DIR=$(SRC_PATH)$(TARGET_DIR)panda_plugins
PLUGIN_SRC_ROOT=$(SRC_PATH)/panda_plugins
PLUGIN_SRC_DIR=$(PLUGIN_SRC_ROOT)/$(PLUGIN_NAME)
ifdef CONFIG_LINUX_USER
$(call set-vpath, $(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR))
QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) -I$(SRC_PATH)/linux-user
endif
TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
QEMU_CFLAGS+=-I$(SRC_PATH)/$(TARGET_DIR) -I$(TARGET_PATH) -DNEED_CPU_H -fPIC
QEMU_CFLAGS+=$(GLIB_CFLAGS)
PLUGIN_OBJ_DIR=$(PLUGIN_TARGET_DIR)/panda_$(PLUGIN_NAME)
$(PLUGIN_OBJ_DIR):
@[ -d $@ ] || mkdir -p $@
$(PLUGIN_OBJ_DIR)/%.o: %.c
@[ -d $(dir $@) ] || mkdir -p $(dir $@)
$(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," CC $@")
$(PLUGIN_OBJ_DIR)/%.o: %.cpp $(GENERATED_HEADERS)
@[ -d $(dir $@) ] || mkdir -p $(dir $@)
$(call quiet-command,$(CXX) $(filter-out -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wold-style-declaration -Wold-style-definition, $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CXXFLAGS)) -c -o $@ $<," CXX $@")
$(PLUGIN_TARGET_DIR)/%.o: %.c
$(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," CC $@")
$(PLUGIN_TARGET_DIR)/%.o: %.cpp $(GENERATED_HEADERS)
$(call quiet-command,$(CXX) $(filter-out -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wold-style-declaration -Wold-style-definition, $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CXXFLAGS)) -c -o $@ $<," CXX $@")