build: organize files into a directory structure

This commit is contained in:
Avi Kivity
2014-08-31 21:25:27 +03:00
parent fc5ad77fc8
commit c77f77ee3f
27 changed files with 34 additions and 34 deletions

View File

@@ -2,8 +2,8 @@
* Copyright 2014 Cloudius Systems
*/
#include "reactor.hh"
#include "sstring.hh"
#include "core/reactor.hh"
#include "core/sstring.hh"
#include <iostream>
#include <algorithm>
#include <unordered_map>

View File

@@ -6,7 +6,7 @@
*/
#include "reactor.hh"
#include "core/reactor.hh"
int main(int ac, char** av)
{

View File

@@ -20,7 +20,7 @@ CXXFLAGS += -I $(src)
# Ubuntu fails without this, see https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1228201
CXXFLAGS += -Wl,--no-as-needed
tests = test-reactor fileiotest virtiotest l3_test ip_test
tests = tests/test-reactor tests/fileiotest tests/virtiotest tests/l3_test tests/ip_test
link = mkdir -p $(@D) && $(CXX) $(CXXFLAGS) -o $@ $^
compile = mkdir -p $(@D) && $(CXX) $(CXXFLAGS) -c -o $@ $<
@@ -31,24 +31,24 @@ compile = mkdir -p $(@D) && $(CXX) $(CXXFLAGS) -c -o $@ $<
%.o: %.cc
$(compile)
all: seastar $(tests) httpd
all: apps/seastar/seastar $(tests) apps/httpd/httpd
clean:
rm seastar $(tests) *.o
seastar: main.o reactor.o
apps/seastar/seastar: apps/seastar/main.o core/reactor.o
$(link)
test-reactor: test-reactor.o reactor.o
tests/test-reactor: tests/test-reactor.o core/reactor.o
httpd: httpd.o reactor.o
apps/httpd/httpd: apps/httpd/httpd.o core/reactor.o
fileiotest: fileiotest.o reactor.o
tests/fileiotest: tests/fileiotest.o core/reactor.o
virtiotest: virtiotest.o virtio.o reactor.o net.o ip.o ethernet.o arp.o
tests/virtiotest: tests/virtiotest.o net/virtio.o core/reactor.o net/net.o net/ip.o net/ethernet.o net/arp.o
l3_test: l3_test.o virtio.o reactor.o net.o ip.o ethernet.o arp.o
tests/l3_test: tests/l3_test.o net/virtio.o core/reactor.o net/net.o net/ip.o net/ethernet.o net/arp.o
ip_test: ip_test.o virtio.o reactor.o net.o ip.o arp.o ethernet.o
tests/ip_test: tests/ip_test.o net/virtio.o core/reactor.o net/net.o net/ip.o net/arp.o net/ethernet.o
-include $(shell find -name '*.d')

View File

View File

View File

@@ -7,10 +7,10 @@
#define ARP_HH_
#include "net.hh"
#include "reactor.hh"
#include "core/reactor.hh"
#include "byteorder.hh"
#include "ethernet.hh"
#include "print.hh"
#include "core/print.hh"
#include <unordered_map>
namespace net {

View File

@@ -7,7 +7,7 @@
#include <array>
#include "byteorder.hh"
#include "print.hh"
#include "core/print.hh"
namespace net {

View File

@@ -4,7 +4,7 @@
*/
#include "ip.hh"
#include "print.hh"
#include "core/print.hh"
namespace net {

View File

View File

View File

@@ -5,7 +5,7 @@
#ifndef NET_HH_
#define NET_HH_
#include "reactor.hh"
#include "core/reactor.hh"
#include "ethernet.hh"
#include <unordered_map>

View File

@@ -3,10 +3,10 @@
*/
#include "virtio.hh"
#include "posix.hh"
#include "vla.hh"
#include "core/posix.hh"
#include "core/vla.hh"
#include "virtio-interface.hh"
#include "reactor.hh"
#include "core/reactor.hh"
#include <atomic>
#include <vector>
#include <queue>

View File

@@ -7,7 +7,7 @@
#include <memory>
#include "net.hh"
#include "sstring.hh"
#include "core/sstring.hh"
std::unique_ptr<net::device> create_virtio_net_device(sstring tap_device);

View File

@@ -3,7 +3,7 @@
*/
#include <algorithm>
#include "reactor.hh"
#include "core/reactor.hh"
struct file_test {
file_test(file&& f) : f(std::move(f)) {}

View File

@@ -2,11 +2,11 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/
#include "arp.hh"
#include "ip.hh"
#include "net.hh"
#include "reactor.hh"
#include "virtio.hh"
#include "net/arp.hh"
#include "net/ip.hh"
#include "net/net.hh"
#include "core/reactor.hh"
#include "net/virtio.hh"
using namespace net;

View File

@@ -2,9 +2,9 @@
* Copyright (C) 2014 Cloudius Systems, Ltd.
*/
#include "net.hh"
#include "reactor.hh"
#include "virtio.hh"
#include "net/net.hh"
#include "core/reactor.hh"
#include "net/virtio.hh"
using namespace net;

View File

@@ -5,7 +5,7 @@
* Author: avi
*/
#include "reactor.hh"
#include "core/reactor.hh"
#include <iostream>
struct test {

View File

@@ -3,9 +3,9 @@
*
*/
#include "virtio.hh"
#include "reactor.hh"
#include "ip.hh"
#include "net/virtio.hh"
#include "core/reactor.hh"
#include "net/ip.hh"
#include <iostream>
#include <utility>
#include <algorithm>