include $(SRC_DIR)/modules/rules.mak
-CFLAGS += -I$(MOD_SRC_DIR)/tapcfg/src/include
+CFLAGS += -I$(TAPCFG_DIRECTORY)/src/include
OBJS = $(MOD).o tapcfg.o taplog.o
$(MOD).so: $(OBJS)
$(CC) $(LDFLAGS) -Wl,-soname,$@ -o $@ $^
endif
-tapcfg.o: $(MOD_SRC_DIR)/tapcfg/src/lib/tapcfg.c
+tapcfg.o: $(TAPCFG_DIRECTORY)/src/lib/tapcfg.c
$(CC) $(CFLAGS) -c -o $@ $<
-taplog.o: $(MOD_SRC_DIR)/tapcfg/src/lib/taplog.c
+taplog.o: $(TAPCFG_DIRECTORY)/src/lib/taplog.c
$(CC) $(CFLAGS) -c -o $@ $<
include $(SRC_DIR)/modules/rules.mak
-CFLAGS += -I$(MOD_SRC_DIR)/tapcfg/src/include
+CFLAGS += -I$(TAPCFG_DIRECTORY)/src/include
OBJS = $(MOD).o tapcfg.o taplog.o
$(MOD).so: $(OBJS)
$(CC) $(LDFLAGS) -Wl,-soname,$@ -o $@ $^
endif
-tapcfg.o: $(MOD_SRC_DIR)/tapcfg/src/lib/tapcfg.c
+tapcfg.o: $(TAPCFG_DIRECTORY)/src/lib/tapcfg.c
$(CC) $(CFLAGS) -c -o $@ $<
-taplog.o: $(MOD_SRC_DIR)/tapcfg/src/lib/taplog.c
+taplog.o: $(TAPCFG_DIRECTORY)/src/lib/taplog.c
$(CC) $(CFLAGS) -c -o $@ $<
+++ /dev/null
-../ethernet/tapcfg/
\ No newline at end of file
import subprocess
from migen.fhdl.structure import _Fragment
-
+from litex import get_data_mod
from litex.build import tools
from litex.build.generic_platform import *
def _generate_sim_variables(include_paths):
+ tapcfg_dir = get_data_mod("misc", "tapcfg").data_location
include = ""
for path in include_paths:
include += "-I"+path+" "
content = """\
SRC_DIR = {}
INC_DIR = {}
-""".format(core_directory, include)
+TAPCFG_DIRECTORY = {}
+""".format(core_directory, include, tapcfg_dir)
tools.write_to_file("variables.mak", content)