citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit dfcaa0a93c9b15574685b8c05c69d419d1595120
parent e11b4a6a3f3e538da207944a15e63e557c305b15
Author: kyle <kyle@getaddrinfo.net>
Date:   Sat,  2 Apr 2016 14:23:04 -0600

finish renaming scv_viewer to citrun_gl

Diffstat:
MJamfile | 1-
MJamrules | 8++++----
Msrc/Jamfile | 39++++++++++++++++++++++++++++-----------
Rsrc/scv_viewer.1 -> src/citrun_gl.1 | 0
4 files changed, 32 insertions(+), 16 deletions(-)

diff --git a/Jamfile b/Jamfile @@ -2,5 +2,4 @@ SubDir TOP ; SubInclude TOP lib ; SubInclude TOP src ; -SubInclude TOP viewer ; SubInclude TOP wrap ; diff --git a/Jamrules b/Jamrules @@ -8,7 +8,7 @@ if $(OS) = OPENBSD { PKG_CONFIG_LIBS = gl glew freetype2 ; # Link directly against libestdc++ from ports - LINKLIBS on scv_viewer = -lestdc++ -lm -lglut ; + LINKLIBS on citrun_gl = -lestdc++ -lm -lglut ; LINKLIBS on citrun_instrument = -lestdc++ @@ -35,8 +35,8 @@ if $(OS) = MACOSX { C++FLAGS = -Wno-deprecated -DLLVM_VER=37 ; PKG_CONFIG_LIBS = glew freetype2 ; - LINKLIBS on scv_viewer = -framework OpenGL -framework GLUT ; - LINKLIBS on scv_viewer += -lc++ -lm ; + LINKLIBS on citrun_gl = -framework OpenGL -framework GLUT ; + LINKLIBS on citrun_gl += -lc++ -lm ; # We must specify that _scv_node0 will be available at runtime LINKFLAGS on libscv.$(SHLIB_SUF) = -Wl,-U,__scv_node0 ; @@ -65,7 +65,7 @@ if $(OS) = LINUX { PKG_CONFIG_LIBS = gl glew freetype2 ; # Link directly against libestdc++ from ports - LINKLIBS on scv_viewer = -lstdc++ -lm -lglut ; + LINKLIBS on citrun_gl = -lstdc++ -lm -lglut ; LINKLIBS on citrun_instrument = -Wl,--start-group diff --git a/src/Jamfile b/src/Jamfile @@ -1,12 +1,11 @@ -SubDir TOP viewer ; +SubDir TOP src ; -SUBDIRC++FLAGS = `pkg-config $(PKG_CONFIG_LIBS) --cflags` ; -SUBDIRC++FLAGS += -I/usr/local/include ; -SUBDIRC++FLAGS += -std=c++11 ; +INSTRUMENT_SRCS = + instrument_main.cc + instrument_action.cc + instrument_ast_visitor.cc ; -LINKLIBS on scv_viewer += `pkg-config $(PKG_CONFIG_LIBS) --libs` ; - -Main scv_viewer : +CITRUN_SRCS = main.cc runtime_process.cc af_unix.cc @@ -19,9 +18,27 @@ Main scv_viewer : matrix4x4.c trackball.c ; -LinkLibraries scv_viewer : libglyphy ; +# libglyphy won't compile with c++11 right now so we have to special case here +ObjectC++Flags $(INSTRUMENT_SRCS) $(CITRUN_SRCS) : -std=c++11 ; + +# Instrument uses clang/llvm to do its job +ObjectC++Flags $(INSTRUMENT_SRCS) : `llvm-config --cxxflags` ; +ObjectC++Flags $(CITRUN_SRCS) : `pkg-config $(PKG_CONFIG_LIBS) --cflags` ; +ObjectC++Flags $(CITRUN_SRCS) : -I/usr/local/include ; + +# Common link libraries on all platforms +LINKFLAGS on citrun_instrument = `llvm-config --ldflags` ; +LINKLIBS on citrun_instrument += `llvm-config --libs bitreader mcparser transformutils option --system-libs` ; +LINKLIBS on citrun_gl += `pkg-config $(PKG_CONFIG_LIBS) --libs` ; + +Main citrun_instrument : $(INSTRUMENT_SRCS) ; +Main citrun_gl : $(CITRUN_SRCS) ; + +LinkLibraries citrun_gl : libglyphy ; -InstallBin $(PREFIX)/bin : scv_viewer ; -InstallMan $(PREFIX)/man : scv_viewer.1 ; +InstallBin $(PREFIX)/bin : citrun_instrument ; +InstallBin $(PREFIX)/bin : citrun_gl ; +InstallMan $(PREFIX)/man : citrun_instrument.1 ; +InstallMan $(PREFIX)/man : citrun_gl.1 ; -SubInclude TOP viewer glyphy ; +SubInclude TOP src glyphy ; diff --git a/src/scv_viewer.1 b/src/citrun_gl.1