Commit 56775bc1 authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

update libraries directory structure

parent f0a363d9
...@@ -27,6 +27,7 @@ base_dir := $(d)./ ...@@ -27,6 +27,7 @@ base_dir := $(d)./
CFLAGS += -Wall -Wextra -Wno-unused-parameter -O3 -fPIC CFLAGS += -Wall -Wextra -Wno-unused-parameter -O3 -fPIC
CXXFLAGS += -Wall -Wextra -Wno-unused-parameter -O3 -fPIC CXXFLAGS += -Wall -Wextra -Wno-unused-parameter -O3 -fPIC
CPPFLAGS += -I$(base_dir)/lib
VERILATOR = verilator VERILATOR = verilator
VFLAGS = +1364-2005ext+v \ VFLAGS = +1364-2005ext+v \
......
...@@ -22,10 +22,8 @@ ...@@ -22,10 +22,8 @@
include mk/subdir_pre.mk include mk/subdir_pre.mk
lib_proto_inc := $(d)proto/ lib_dir := $(d)
$(eval $(call subdir,netif)) $(eval $(call subdir,simbricks))
$(eval $(call subdir,nicif))
$(eval $(call subdir,nicbm))
include mk/subdir_post.mk include mk/subdir_post.mk
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <sys/socket.h> #include <sys/socket.h>
#include <unistd.h> #include <unistd.h>
#include <netsim.h> #include <simbricks/netif/netsim.h>
#include "internal.h" #include "internal.h"
static uint64_t current_epoch = 0; static uint64_t current_epoch = 0;
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include <cosim_eth_proto.h> #include <simbricks/proto/network.h>
#define SYNC_MODES 0 #define SYNC_MODES 0
#define SYNC_BARRIER 1 #define SYNC_BARRIER 1
......
...@@ -23,12 +23,9 @@ ...@@ -23,12 +23,9 @@
include mk/subdir_pre.mk include mk/subdir_pre.mk
lib_netsim := $(d)libnetsim_common.a lib_netsim := $(d)libnetsim_common.a
lib_netsim_inc := $(d)include/
OBJS := $(addprefix $(d),netsim.o utils.o) OBJS := $(addprefix $(d),netsim.o utils.o)
$(OBJS): CPPFLAGS := $(CPPFLAGS) -I$(lib_netsim_inc) -I$(lib_proto_inc)
$(lib_netsim): $(OBJS) $(lib_netsim): $(OBJS)
CLEAN := $(lib_netsim) $(OBJS) CLEAN := $(lib_netsim) $(OBJS)
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <ctime> #include <ctime>
#include <iostream> #include <iostream>
#include <nicbm.h> #include <simbricks/nicbm/nicbm.h>
//#define DEBUG_NICBM 1 //#define DEBUG_NICBM 1
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <set> #include <set>
#include <deque> #include <deque>
extern "C" { extern "C" {
#include <nicsim.h> #include <simbricks/nicif/nicsim.h>
} }
namespace nicbm { namespace nicbm {
......
...@@ -23,13 +23,9 @@ ...@@ -23,13 +23,9 @@
include mk/subdir_pre.mk include mk/subdir_pre.mk
lib_nicbm := $(d)libnicbm.a lib_nicbm := $(d)libnicbm.a
lib_nicbm_inc := $(d)include/
OBJS := $(addprefix $(d),nicbm.o) OBJS := $(addprefix $(d),nicbm.o)
$(OBJS): CPPFLAGS := $(CPPFLAGS) -I$(lib_nicbm_inc) -I$(lib_proto_inc) \
-I$(lib_nicsim_inc)
$(lib_nicbm): $(OBJS) $(lib_nicbm): $(OBJS)
CLEAN := $(lib_nicbm) $(OBJS) CLEAN := $(lib_nicbm) $(OBJS)
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <poll.h> #include <poll.h>
#include <unistd.h> #include <unistd.h>
#include <nicsim.h> #include <simbricks/nicif/nicsim.h>
#include "internal.h" #include "internal.h"
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
#ifndef COSIM_NICSIM_H_ #ifndef COSIM_NICSIM_H_
#define COSIM_NICSIM_H_ #define COSIM_NICSIM_H_
#include <cosim_pcie_proto.h> #include <simbricks/proto/pcie.h>
#include <cosim_eth_proto.h> #include <simbricks/proto/network.h>
#define SYNC_MODES 0 // ModES style synchronization #define SYNC_MODES 0 // ModES style synchronization
#define SYNC_BARRIER 1 // Global barrier style synchronization #define SYNC_BARRIER 1 // Global barrier style synchronization
......
...@@ -23,12 +23,9 @@ ...@@ -23,12 +23,9 @@
include mk/subdir_pre.mk include mk/subdir_pre.mk
lib_nicsim := $(d)libnicsim_common.a lib_nicsim := $(d)libnicsim_common.a
lib_nicsim_inc := $(d)include/
OBJS := $(addprefix $(d),nicsim.o utils.o) OBJS := $(addprefix $(d),nicsim.o utils.o)
$(OBJS): CPPFLAGS := $(CPPFLAGS) -I$(lib_nicsim_inc) -I$(lib_proto_inc)
$(lib_nicsim): $(OBJS) $(lib_nicsim): $(OBJS)
CLEAN := $(lib_nicsim) $(OBJS) CLEAN := $(lib_nicsim) $(OBJS)
......
# Copyright 2021 Max Planck Institute for Software Systems, and
# National University of Singapore
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
include mk/subdir_pre.mk
$(eval $(call subdir,netif))
$(eval $(call subdir,nicif))
$(eval $(call subdir,nicbm))
include mk/subdir_post.mk
...@@ -43,7 +43,7 @@ $(d)qemu/ready: $(d)qemu ...@@ -43,7 +43,7 @@ $(d)qemu/ready: $(d)qemu
+cd $< && ./configure \ +cd $< && ./configure \
--target-list=x86_64-softmmu \ --target-list=x86_64-softmmu \
--disable-werror \ --disable-werror \
--extra-cflags="-I$(abspath $(lib_proto_inc))" \ --extra-cflags="-I$(abspath $(lib_dir))" \
--enable-cosim-pci && \ --enable-cosim-pci && \
$(MAKE) $(MAKE)
touch $@ touch $@
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include <cassert> #include <cassert>
extern "C" { extern "C" {
#include <netsim.h> #include <simbricks/netif/netsim.h>
}; };
static uint64_t sync_period = (500 * 1000ULL); // 500ns static uint64_t sync_period = (500 * 1000ULL); // 500ns
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment