Skip to content
Permalink
Browse files

got rid of infra

  • Loading branch information...
antoninbas committed Mar 16, 2015
1 parent b21f309 commit a1af97e8dacbcaa31dba6c741034a7767f3d36bc
Showing with 453 additions and 13,959 deletions.
  1. +3 −0 .gitignore
  2. +0 −3 .gitmodules
  3. +0 −1,870 Doxyfile
  4. +0 −187 DoxygenLayout.xml
  5. +66 −10 Makefile
  6. +0 −68 init.mk
  7. +8 −0 modules.mk
  8. +0 −2,303 modules/BMI/BMI.doxy
  9. +0 −14 modules/BMI/BMI.mk
  10. +0 −9 modules/BMI/Makefile
  11. +0 −6 modules/BMI/README
  12. 0 modules/BMI/all
  13. 0 modules/BMI/{module/inc → include}/BMI/bmi_port.h
  14. +10 −0 modules/BMI/module.mk
  15. +0 −47 modules/BMI/module/auto/BMI.yml
  16. +0 −9 modules/BMI/module/auto/make.mk
  17. +0 −14 modules/BMI/module/inc/BMI/bmi.x
  18. +0 −127 modules/BMI/module/inc/BMI/bmi_config.h
  19. +0 −26 modules/BMI/module/inc/BMI/bmi_dox.h
  20. +0 −107 modules/BMI/module/inc/BMI/bmi_porting.h
  21. +0 −10 modules/BMI/module/make.mk
  22. +0 −9 modules/BMI/module/src/Makefile
  23. +0 −76 modules/BMI/module/src/bmi_config.c
  24. +0 −10 modules/BMI/module/src/bmi_enums.c
  25. +0 −12 modules/BMI/module/src/bmi_int.h
  26. +0 −18 modules/BMI/module/src/bmi_log.c
  27. +0 −12 modules/BMI/module/src/bmi_log.h
  28. +0 −23 modules/BMI/module/src/bmi_module.c
  29. +0 −50 modules/BMI/module/src/bmi_ucli.c
  30. +0 −9 modules/BMI/module/src/make.mk
  31. 0 modules/BMI/{module → }/src/bmi_interface.c
  32. 0 modules/BMI/{module → }/src/bmi_interface.h
  33. 0 modules/BMI/{module → }/src/bmi_port.c
  34. +0 −8 modules/BMI/utest/_make.mk
  35. +0 −35 modules/BMI/utest/main.c
  36. +0 −40 modules/Makefile
  37. +0 −15 modules/Manifest.mk
  38. +0 −9 modules/behavioral_sim/Makefile
  39. +0 −6 modules/behavioral_sim/README
  40. +0 −2,303 modules/behavioral_sim/behavioral_sim.doxy
  41. +0 −14 modules/behavioral_sim/behavioral_sim.mk
  42. +0 −47 modules/behavioral_sim/module/auto/behavioral_sim.yml
  43. +0 −9 modules/behavioral_sim/module/auto/make.mk
  44. +0 −14 modules/behavioral_sim/module/inc/behavioral_sim/behavioral_sim.x
  45. +0 −127 modules/behavioral_sim/module/inc/behavioral_sim/behavioral_sim_config.h
  46. +0 −26 modules/behavioral_sim/module/inc/behavioral_sim/behavioral_sim_dox.h
  47. +0 −107 modules/behavioral_sim/module/inc/behavioral_sim/behavioral_sim_porting.h
  48. +0 −10 modules/behavioral_sim/module/make.mk
  49. +0 −9 modules/behavioral_sim/module/src/Makefile
  50. +0 −76 modules/behavioral_sim/module/src/behavioral_sim_config.c
  51. +0 −10 modules/behavioral_sim/module/src/behavioral_sim_enums.c
  52. +0 −12 modules/behavioral_sim/module/src/behavioral_sim_int.h
  53. +0 −18 modules/behavioral_sim/module/src/behavioral_sim_log.c
  54. +0 −12 modules/behavioral_sim/module/src/behavioral_sim_log.h
  55. +0 −23 modules/behavioral_sim/module/src/behavioral_sim_module.c
  56. +0 −50 modules/behavioral_sim/module/src/behavioral_sim_ucli.c
  57. +0 −9 modules/behavioral_sim/module/src/make.mk
  58. +0 −8 modules/behavioral_sim/utest/_make.mk
  59. +0 −25 modules/behavioral_sim/utest/main.c
  60. +0 −46 modules/behavioral_sim/utest/utests.cpp
  61. +0 −9 modules/behavioral_utils/Makefile
  62. +0 −6 modules/behavioral_utils/README
  63. +0 −2,303 modules/behavioral_utils/behavioral_utils.doxy
  64. +0 −14 modules/behavioral_utils/behavioral_utils.mk
  65. +0 −47 modules/behavioral_utils/module/auto/behavioral_utils.yml
  66. +0 −9 modules/behavioral_utils/module/auto/make.mk
  67. +0 −14 modules/behavioral_utils/module/inc/behavioral_utils/behavioral_utils.x
  68. +0 −127 modules/behavioral_utils/module/inc/behavioral_utils/behavioral_utils_config.h
  69. +0 −26 modules/behavioral_utils/module/inc/behavioral_utils/behavioral_utils_dox.h
  70. +0 −107 modules/behavioral_utils/module/inc/behavioral_utils/behavioral_utils_porting.h
  71. +0 −264 modules/behavioral_utils/module/inc/behavioral_utils/json-forwards.h
  72. +0 −10 modules/behavioral_utils/module/make.mk
  73. +0 −9 modules/behavioral_utils/module/src/Makefile
  74. +0 −76 modules/behavioral_utils/module/src/behavioral_utils_config.c
  75. +0 −10 modules/behavioral_utils/module/src/behavioral_utils_enums.c
  76. +0 −12 modules/behavioral_utils/module/src/behavioral_utils_int.h
  77. +0 −18 modules/behavioral_utils/module/src/behavioral_utils_log.c
  78. +0 −12 modules/behavioral_utils/module/src/behavioral_utils_log.h
  79. +0 −23 modules/behavioral_utils/module/src/behavioral_utils_module.c
  80. +0 −50 modules/behavioral_utils/module/src/behavioral_utils_ucli.c
  81. +0 −9 modules/behavioral_utils/module/src/make.mk
  82. +0 −8 modules/behavioral_utils/utest/_make.mk
  83. +0 −19 modules/behavioral_utils/utest/main.c
  84. +42 −0 modules/bf_lpm_trie/Makefile
  85. 0 ...es/{behavioral_utils/module/inc/behavioral_utils → bf_lpm_trie/include/bf_lpm_trie}/bf_lpm_trie.h
  86. +9 −0 modules/bf_lpm_trie/module.mk
  87. 0 modules/{behavioral_utils/module → bf_lpm_trie}/src/bf_lpm_trie.c
  88. +1 −1 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/P4Objects.h
  89. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/actions.h
  90. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/bignum.h
  91. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/bytecontainer.h
  92. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/conditionals.h
  93. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/control_flow.h
  94. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/data.h
  95. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/deparser.h
  96. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/entries.h
  97. +1 −1 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/event_logger.h
  98. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/fields.h
  99. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/handle_mgr.h
  100. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/headers.h
  101. +1 −1 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/lpm_trie.h
  102. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/named_p4object.h
  103. 0 modules/{behavioral_utils/module/inc/behavioral_utils → bm_sim/include/bm_sim}/nn.h
  104. +1 −1 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/packet.h
  105. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/packet_buffer.h
  106. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/parser.h
  107. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/phv.h
  108. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/pipeline.h
  109. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/queue.h
  110. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/runtime_interface.h
  111. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/stateful.h
  112. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/switch.h
  113. 0 modules/{behavioral_sim/module/inc/behavioral_sim → bm_sim/include/bm_sim}/tables.h
  114. 0 modules/{behavioral_utils/module/inc/behavioral_utils → bm_sim/include/bm_sim}/xxhash.h
  115. +12 −0 modules/bm_sim/module.mk
  116. +1 −1 modules/{behavioral_sim/module → bm_sim}/src/P4Objects.cpp
  117. +1 −1 modules/{behavioral_sim/module → bm_sim}/src/actions.cpp
  118. +27 −0 modules/bm_sim/src/bignum.h
  119. +2 −2 modules/{behavioral_sim/module → bm_sim}/src/conditionals.cpp
  120. +1 −1 modules/{behavioral_sim/module → bm_sim}/src/deparser.cpp
  121. +6 −6 modules/{behavioral_sim/module → bm_sim}/src/event_logger.cpp
  122. +1 −1 modules/{behavioral_sim/module → bm_sim}/src/fields.cpp
  123. +1 −1 modules/{behavioral_sim/module → bm_sim}/src/headers.cpp
  124. +1 −1 modules/{behavioral_sim/module → bm_sim}/src/parser.cpp
  125. +1 −1 modules/{behavioral_sim/module → bm_sim}/src/phv.cpp
  126. +2 −2 modules/{behavioral_sim/module → bm_sim}/src/pipeline.cpp
  127. +2 −2 modules/{behavioral_sim/module → bm_sim}/src/switch.cpp
  128. +2 −2 modules/{behavioral_sim/module → bm_sim}/src/tables.cpp
  129. +1 −1 modules/{behavioral_utils/module → bm_sim}/src/xxhash.c
  130. +42 −0 modules/jsoncpp/Makefile
  131. +1 −0 modules/jsoncpp/build/jsoncpp.d
  132. 0 modules/{behavioral_utils/module/inc/behavioral_utils → jsoncpp/include/jsoncpp}/json.h
  133. +9 −0 modules/jsoncpp/module.mk
  134. +1 −1 modules/{behavioral_utils/module → jsoncpp}/src/jsoncpp.cpp
  135. +0 −1 submodules/infra
  136. +0 −85 submodules/init.py
  137. +1 −2 targets/simple_switch/.gitignore
  138. +0 −10 targets/simple_switch/BMI.mk
  139. +60 −29 targets/simple_switch/Makefile
  140. +1 −1 targets/simple_switch/main.c
  141. +7 −7 targets/simple_switch/simple_switch.cpp
  142. +10 −8 targets/simple_switch/simple_switch.mk
  143. +0 −4 targets/tm_test/.gitignore
  144. +0 −39 targets/tm_test/Makefile
  145. +0 −25 targets/tm_test/main.c
  146. +0 −10 targets/utests/BMI/BMI_utest.mk
  147. +0 −16 targets/utests/BMI/Makefile
  148. +0 −29 targets/utests/BMI/dependmodules.x
  149. +0 −17 targets/utests/behavioral_sim/Makefile
  150. +0 −10 targets/utests/behavioral_sim/behavioral_sim_utest.mk
  151. +0 −37 targets/utests/behavioral_sim/dependmodules.x
  152. +0 −13 targets/utests/behavioral_utils/Makefile
  153. +76 −0 tests/Makefile
  154. 0 {modules/behavioral_sim/utest → tests/gtest}/gtest-all.cpp
  155. 0 {modules/behavioral_sim/module/inc → tests}/gtest/gtest.h
  156. +9 −0 tests/gtest/module.mk
  157. +12 −0 tests/main.cpp
  158. BIN tests/test
  159. +1 −1 {modules/behavioral_sim/utest → tests}/test_actions.cpp
  160. +1 −1 {modules/behavioral_sim/utest → tests}/test_conditionals.cpp
  161. +1 −1 {modules/behavioral_sim/utest → tests}/test_data.cpp
  162. +1 −1 {modules/behavioral_sim/utest → tests}/test_handle_mgr.cpp
  163. +1 −1 {modules/behavioral_sim/utest → tests}/test_p4objects.cpp
  164. +2 −2 {modules/behavioral_sim/utest → tests}/test_parser.cpp
  165. +1 −1 {modules/behavioral_sim/utest → tests}/test_queue.cpp
  166. +1 −1 {modules/behavioral_sim/utest → tests}/test_tables.cpp
  167. +12 −0 tests/tests.mk
  168. +0 −2,081 tools/crc_info.txt
  169. +0 −37 tools/infra.py
  170. +0 −78 tools/newmodule.py
  171. +0 −105 tools/uclimod.py
@@ -30,5 +30,8 @@
# Python byet code
*.pyc

build/*
lib*

# Emacs
*~
@@ -1,3 +0,0 @@
[submodule "submodules/infra"]
path = submodules/infra
url = git@github.com:barefootnetworks/infra.git
1,870 Doxyfile

This file was deleted.

This file was deleted.

@@ -1,15 +1,71 @@
all:
@echo "make doc : Make Doxygen documentation"
@echo "make check : Make and run unit tests (incomplete)"
CC:= gcc
CXX:= g++
CFLAGS:= -O0 -g -Wall
CPPFLAGS:= -O0 -g -Wall --std=c++11
LIBS:= -lJudy
INCS:=

check:
make -C targets/utests/modtest
TARGET:=libModules

doc:
doxygen
BUILD_DIR := build
BUILD_DIRS := $(BUILD_DIR)

clean:
@rm -rf doc
srcs_C:=
srcs_CXX:=

MODULES_DIR :=
MODULES_NAMES :=

include modules.mk

CFLAGS += $(COMMON_FLAGS)
CPPFLAGS += $(COMMON_FLAGS)

srcs := $(srcs_C) $(srcs_CXX)
BUILD_DIRS += $(patsubst %, $(BUILD_DIR)/%, $(sort $(realpath $(dir $(srcs)))))

CFLAGS += $(patsubst %, -I%, $(INCS))
CPPFLAGS += $(patsubst %, -I%, $(INCS))

objs_C := $(patsubst %.c, %.o, $(srcs_C))
objs_CXX := $(patsubst %.cpp, %.o, $(srcs_CXX))

objs := $(objs_C) $(objs_CXX)

deps_C := $(patsubst %.c, %.d, $(srcs_C))
deps_CXX := $(patsubst %.cpp, %.d, $(srcs_CXX))

deps := $(deps_C) $(deps_CXX)

deps_ := $(patsubst %, $(BUILD_DIR)/%, $(deps))
objs_ := $(patsubst %, $(BUILD_DIR)/%, $(objs))

$(TARGET): $(objs_) | $(BUILD_DIRS)
ar -rcs $@ $^

$(BUILD_DIRS):
mkdir -p $@

$(BUILD_DIR)/%.d: %.c | $(BUILD_DIRS)
$(CC) $(CFLAGS) $(INC) -MM $< -MT $(BUILD_DIR)$*.o -o $(BUILD_DIR)$*.d

$(BUILD_DIR)/%.d: %.cpp | $(BUILD_DIRS)
$(CXX) $(CPPFLAGS) $(INC) -MM $< -MT $(BUILD_DIR)$*.o -o $(BUILD_DIR)$*.d

ifeq ($(MAKECMDGOALS),clean)
# doing clean, so dont make deps.
else
# doing build, so make deps.
-include $(deps_)
endif

$(BUILD_DIR)/%.o: %.c | $(BUILD_DIRS)
$(CC) $(CFLAGS) $(INC) -c -o $(BUILD_DIR)$*.o $<

$(BUILD_DIR)/%.o: %.cpp | $(BUILD_DIRS)
$(CXX) $(CPPFLAGS) $(INC) -c -o $(BUILD_DIR)$*.o $<

clean:
rm -rf $(BUILD_DIRS) $(TARGET)

.PHONY: doc
.PHONY: clean
68 init.mk

This file was deleted.

@@ -0,0 +1,8 @@
THIS_DIR := $(dir $(lastword $(MAKEFILE_LIST)))

MODULES_DIR := $(THIS_DIR)modules
MODULES_NAMES := jsoncpp BMI bf_lpm_trie bm_sim
MODULES := $(patsubst %, $(MODULES_DIR)/%, $(MODULES_NAMES))

include $(patsubst %, %/module.mk, $(MODULES))

0 comments on commit a1af97e

Please sign in to comment.
You can’t perform that action at this time.