Browse Source

Split sources into subdirs

master
Stefan Bühler 12 years ago
parent
commit
540ff7db02
  1. 6
      cmake/FindRagel.cmake
  2. 9
      cmake/LighttpdMacros.cmake
  3. 80
      src/CMakeLists.txt
  4. 0
      src/angel/angel_config_parser.rl
  5. 0
      src/angel/angel_log.c
  6. 0
      src/angel/angel_main.c
  7. 0
      src/angel/angel_plugin.c
  8. 0
      src/angel/angel_plugin_core.c
  9. 0
      src/angel/angel_server.c
  10. 0
      src/angel/angel_value.c
  11. 3
      src/base.c
  12. 0
      src/common/angel_connection.c
  13. 0
      src/common/angel_data.c
  14. 0
      src/common/encoding.c
  15. 0
      src/common/idlist.c
  16. 0
      src/common/ip_parsers.rl
  17. 0
      src/common/module.c
  18. 0
      src/common/radix.c
  19. 0
      src/common/sys-files.c
  20. 0
      src/common/sys-socket.c
  21. 0
      src/common/utils.c
  22. 0
      src/common/waitqueue.c
  23. 0
      src/main/actions.c
  24. 0
      src/main/actions_lua.c
  25. 0
      src/main/angel.c
  26. 0
      src/main/angel_fake.c
  27. 0
      src/main/chunk.c
  28. 0
      src/main/chunk_parser.c
  29. 0
      src/main/collect.c
  30. 0
      src/main/condition.c
  31. 0
      src/main/condition_lua.c
  32. 0
      src/main/config_lua.c
  33. 0
      src/main/config_parser.rl
  34. 0
      src/main/connection.c
  35. 0
      src/main/environment.c
  36. 0
      src/main/etag.c
  37. 0
      src/main/filter_chunked.c
  38. 0
      src/main/http_headers.c
  39. 0
      src/main/http_request_parser.rl
  40. 0
      src/main/http_response_parser.rl
  41. 0
      src/main/lighttpd-glue.c
  42. 0
      src/main/lighttpd.c
  43. 0
      src/main/log.c
  44. 0
      src/main/network.c
  45. 0
      src/main/network_sendfile.c
  46. 0
      src/main/network_write.c
  47. 0
      src/main/network_writev.c
  48. 0
      src/main/options.c
  49. 0
      src/main/plugin.c
  50. 0
      src/main/plugin_core.c
  51. 0
      src/main/profiler.c
  52. 0
      src/main/request.c
  53. 0
      src/main/response.c
  54. 0
      src/main/server.c
  55. 0
      src/main/stat_cache.c
  56. 0
      src/main/tests.c
  57. 0
      src/main/throttle.c
  58. 0
      src/main/url_parser.rl
  59. 0
      src/main/value.c
  60. 0
      src/main/value_lua.c
  61. 0
      src/main/virtualrequest.c
  62. 0
      src/main/worker.c

6
cmake/FindRagel.cmake

@ -21,10 +21,12 @@ IF(RAGEL_FOUND)
IF(NOT RAGEL_FLAGS)
SET(RAGEL_FLAGS "-T1")
ENDIF(NOT RAGEL_FLAGS)
MACRO(RAGEL_PARSER SRCFILE)
GET_FILENAME_COMPONENT(SRCPATH "${SRCFILE}" PATH)
GET_FILENAME_COMPONENT(SRCBASE "${SRCFILE}" NAME_WE)
SET(OUTFILE "${CMAKE_CURRENT_BINARY_DIR}/${SRCBASE}.c")
SET(OUTFILE "${CMAKE_CURRENT_BINARY_DIR}/${SRCPATH}/${SRCBASE}.c")
FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${SRCPATH}")
SET(INFILE "${CMAKE_CURRENT_SOURCE_DIR}/${SRCFILE}")
SET(_flags ${ARGV1})
IF(NOT _flags)

9
cmake/LighttpdMacros.cmake

@ -36,3 +36,12 @@ MACRO(ADD_TARGET_PROPERTIES _target _name)
ENDIF(NOT _old_properties)
SET_TARGET_PROPERTIES(${_target} PROPERTIES ${_name} "${_old_properties} ${_properties}")
ENDMACRO(ADD_TARGET_PROPERTIES)
MACRO(ADD_PREFIX _target _prefix)
SET(_oldtarget ${${_target}})
SET(_newtarget)
FOREACH(_t ${_oldtarget})
SET(_newtarget ${_newtarget} "${_prefix}${_t}")
ENDFOREACH(_t)
SET(${_target} ${_newtarget})
ENDMACRO(ADD_PREFIX)

80
src/CMakeLists.txt

@ -181,63 +181,67 @@ ADD_DEFINITIONS(
ENDIF(NOT WIN32)
## Write out config.h
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/include/lighttpd/config.h)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/include/main/config.h)
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/include ${CMAKE_BINARY_DIR}/include)
SET(COMMON_SRC
angel.c
angel_connection.c
angel_data.c
encoding.c
idlist.c
ip_parsers.c
module.c
radix.c
sys-files.c
sys-socket.c
utils.c
waitqueue.c
)
ADD_PREFIX(COMMON_SRC common/)
SET(LIGHTTPD_SHARED_SRC
angel.c
angel_fake.c
actions.c
base.c
chunk.c
chunk_parser.c
collect.c
condition.c
config_parser.c
connection.c
encoding.c
environment.c
etag.c
filter_chunked.c
http_headers.c
http_request_parser.c
http_response_parser.c
idlist.c
ip_parsers.c
lighttpd-glue.c
log.c
module.c
network.c
network_write.c network_writev.c
network_sendfile.c
options.c
plugin.c
profiler.c
radix.c
request.c
response.c
server.c
stat_cache.c
sys-files.c
sys-socket.c
throttle.c
url_parser.c
utils.c
value.c
virtualrequest.c
waitqueue.c
worker.c
plugin_core.c
)
IF(WITH_LUA)
SET(COMMON_SRC ${COMMON_SRC}
SET(LIGHTTPD_SHARED_SRC ${LIGHTTPD_SHARED_SRC}
actions_lua.c
condition_lua.c
config_lua.c
@ -245,22 +249,42 @@ SET(COMMON_SRC ${COMMON_SRC}
)
ENDIF(WITH_LUA)
ADD_PREFIX(LIGHTTPD_SHARED_SRC main/)
SET(ANGEL_SHARED_SRC
angel_config_parser.c
angel_log.c
angel_plugin.c
angel_plugin_core.c
angel_server.c
angel_value.c
)
ADD_PREFIX(ANGEL_SHARED_SRC angel/)
## Build parsers by using ragel...
RAGEL_PARSER(config_parser.rl -T0)
RAGEL_PARSER(http_request_parser.rl)
RAGEL_PARSER(http_response_parser.rl)
RAGEL_PARSER(ip_parsers.rl)
RAGEL_PARSER(url_parser.rl)
RAGEL_PARSER(angel_config_parser.rl)
RAGEL_PARSER(main/config_parser.rl -T0)
RAGEL_PARSER(main/http_request_parser.rl)
RAGEL_PARSER(main/http_response_parser.rl)
RAGEL_PARSER(common/ip_parsers.rl)
RAGEL_PARSER(main/url_parser.rl)
RAGEL_PARSER(angel/angel_config_parser.rl)
SET(L_INSTALL_TARGETS)
ADD_EXECUTABLE(lighttpd
lighttpd.c
main/lighttpd.c
${LIGHTTPD_SHARED_SRC}
${COMMON_SRC}
)
SET(L_INSTALL_TARGETS ${L_INSTALL_TARGETS} lighttpd)
ADD_EXECUTABLE(lighttpd-angel
angel/angel_main.c
${ANGEL_SHARED_SRC}
${COMMON_SRC}
)
SET(L_INSTALL_TARGETS ${L_INSTALL_TARGETS} lighttpd-angel)
IF(BUILD_EXTRA_WARNINGS)
SET(WARN_FLAGS "-g -O2 -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Wsign-compare -Wnested-externs -Wpointer-arith -Wl,--as-needed")
# -Werror -Wbad-function-cast -Wmissing-prototypes
@ -287,22 +311,6 @@ ADD_AND_INSTALL_LIBRARY(mod_vhost "modules/mod_vhost.c")
ADD_TARGET_PROPERTIES(lighttpd LINK_FLAGS ${COMMON_LDFLAGS})
ADD_TARGET_PROPERTIES(lighttpd COMPILE_FLAGS ${COMMON_CFLAGS})
ADD_EXECUTABLE(lighttpd-angel
angel_config_parser.c
angel_connection.c
angel_data.c
angel_log.c
angel_main.c
angel_plugin.c
angel_plugin_core.c
angel_server.c
angel_value.c
idlist.c
ip_parsers.c
module.c
utils.c
)
ADD_TARGET_PROPERTIES(lighttpd-angel LINK_FLAGS "${LUA_LDFLAGS} ${EV_LDFLAGS} ${GTHREAD_LDFLAGS} ${GMODULE_LDFLAGS} ${WARN_FLAGS}")
ADD_TARGET_PROPERTIES(lighttpd-angel COMPILE_FLAGS "${LUA_CFLAGS} ${EV_CFLAGS} ${GTHREAD_CFLAGS} ${GMODULE_CFLAGS} ${WARN_FLAGS}")

0
src/angel_config_parser.rl → src/angel/angel_config_parser.rl

0
src/angel_log.c → src/angel/angel_log.c

0
src/angel_main.c → src/angel/angel_main.c

0
src/angel_plugin.c → src/angel/angel_plugin.c

0
src/angel_plugin_core.c → src/angel/angel_plugin_core.c

0
src/angel_server.c → src/angel/angel_server.c

0
src/angel_value.c → src/angel/angel_value.c

3
src/base.c

@ -1,3 +0,0 @@
#include <lighttpd/base.h>

0
src/angel_connection.c → src/common/angel_connection.c

0
src/angel_data.c → src/common/angel_data.c

0
src/encoding.c → src/common/encoding.c

0
src/idlist.c → src/common/idlist.c

0
src/ip_parsers.rl → src/common/ip_parsers.rl

0
src/module.c → src/common/module.c

0
src/radix.c → src/common/radix.c

0
src/sys-files.c → src/common/sys-files.c

0
src/sys-socket.c → src/common/sys-socket.c

0
src/utils.c → src/common/utils.c

0
src/waitqueue.c → src/common/waitqueue.c

0
src/actions.c → src/main/actions.c

0
src/actions_lua.c → src/main/actions_lua.c

0
src/angel.c → src/main/angel.c

0
src/angel_fake.c → src/main/angel_fake.c

0
src/chunk.c → src/main/chunk.c

0
src/chunk_parser.c → src/main/chunk_parser.c

0
src/collect.c → src/main/collect.c

0
src/condition.c → src/main/condition.c

0
src/condition_lua.c → src/main/condition_lua.c

0
src/config_lua.c → src/main/config_lua.c

0
src/config_parser.rl → src/main/config_parser.rl

0
src/connection.c → src/main/connection.c

0
src/environment.c → src/main/environment.c

0
src/etag.c → src/main/etag.c

0
src/filter_chunked.c → src/main/filter_chunked.c

0
src/http_headers.c → src/main/http_headers.c

0
src/http_request_parser.rl → src/main/http_request_parser.rl

0
src/http_response_parser.rl → src/main/http_response_parser.rl

0
src/lighttpd-glue.c → src/main/lighttpd-glue.c

0
src/lighttpd.c → src/main/lighttpd.c

0
src/log.c → src/main/log.c

0
src/network.c → src/main/network.c

0
src/network_sendfile.c → src/main/network_sendfile.c

0
src/network_write.c → src/main/network_write.c

0
src/network_writev.c → src/main/network_writev.c

0
src/options.c → src/main/options.c

0
src/plugin.c → src/main/plugin.c

0
src/plugin_core.c → src/main/plugin_core.c

0
src/profiler.c → src/main/profiler.c

0
src/request.c → src/main/request.c

0
src/response.c → src/main/response.c

0
src/server.c → src/main/server.c

0
src/stat_cache.c → src/main/stat_cache.c

0
src/tests.c → src/main/tests.c

0
src/throttle.c → src/main/throttle.c

0
src/url_parser.rl → src/main/url_parser.rl

0
src/value.c → src/main/value.c

0
src/value_lua.c → src/main/value_lua.c

0
src/virtualrequest.c → src/main/virtualrequest.c

0
src/worker.c → src/main/worker.c

Loading…
Cancel
Save