commit d84df88ee6cde142c21cda90ee0229cdb1497cb2
parent 7959454316451a9f4db256b763b88f2d346dfd99
Author: Kyle Milz <kyle@getaddrinfo.net>
Date: Mon, 28 Mar 2016 23:27:00 -0600
replace Make with Jam
Diffstat:
12 files changed, 84 insertions(+), 91 deletions(-)
diff --git a/Jamfile b/Jamfile
@@ -0,0 +1,6 @@
+SubDir TOP ;
+
+SubInclude TOP instrument ;
+SubInclude TOP lib ;
+SubInclude TOP viewer ;
+SubInclude TOP wrap ;
diff --git a/Jamrules b/Jamrules
@@ -0,0 +1,2 @@
+#OPTIM = -O2 ;
+#C++ = clang++ ;
diff --git a/Makefile b/Makefile
@@ -1,6 +0,0 @@
-SUBDIR= instrument lib viewer/glyphy viewer
-
-test: all
- prove
-
-.include <bsd.subdir.mk>
diff --git a/instrument/Jamfile b/instrument/Jamfile
@@ -0,0 +1,28 @@
+SubDir TOP instrument ;
+
+SUBDIRC++FLAGS = `llvm-config --cxxflags` ;
+
+Main scv_instrument : main.cc
+ instrument_action.cc
+ rewrite_ast_visitor.cc ;
+
+LINKFLAGS on scv_instrument = `llvm-config --ldflags` ;
+LINKLIBS on scv_instrument =
+ -lestdc++
+ -Wl,--start-group
+ -lclangAST
+ -lclangAnalysis
+ -lclangBasic
+ -lclangDriver
+ -lclangEdit
+ -lclangFrontend
+ -lclangFrontendTool
+ -lclangLex -lclangParse
+ -lclangRewriteCore
+ -lclangRewriteFrontend
+ -lclangSema
+ -lclangSerialization
+ -lclangTooling
+ -Wl,--end-group ;
+
+LINKLIBS on scv_instrument += `llvm-config --libs bitreader mcparser transformutils option --system-libs` ;
diff --git a/instrument/Makefile b/instrument/Makefile
@@ -1,33 +0,0 @@
-PROG = scv_instrument
-SRCS = main.cc \
- instrument_action.cc \
- rewrite_ast_visitor.cc
-
-CXXFLAGS += -std=c++11
-CXXFLAGS += `llvm-config --cxxflags`
-LDFLAGS += `llvm-config --ldflags`
-
-# Clang has a circular dependencies here, use "linker group options" to avoid
-LDADD += -Wl,--start-group \
- -lclangAST \
- -lclangAnalysis \
- -lclangBasic \
- -lclangDriver \
- -lclangEdit \
- -lclangFrontend \
- -lclangFrontendTool \
- -lclangLex \
- -lclangParse \
- -lclangRewriteCore \
- -lclangRewriteFrontend \
- -lclangSema \
- -lclangSerialization \
- -lclangTooling \
- -Wl,--end-group \
-
-LDADD += `llvm-config --libs bitreader mcparser transformutils option --system-libs`
-
-depend:
- # fucking thing doesn't work
-
-.include <bsd.prog.mk>
diff --git a/lib/Jamfile b/lib/Jamfile
@@ -0,0 +1,7 @@
+SubDir TOP lib ;
+
+SubDirCcFlags -pthread -fpic -DPIC ;
+
+Main libscv.so.0.0 : runtime.c ;
+
+LINKFLAGS on libscv.so.0.0 = -shared -fpic -pthread ;
diff --git a/lib/Makefile b/lib/Makefile
@@ -1,15 +0,0 @@
-LIB = scv
-SRCS = runtime.c
-
-SHLIB_MAJOR = 0
-SHLIB_MINOR = 0
-
-CFLAGS += -pthread
-
-# OS X linker will not do runtime symbol lookup by default
-LDFLAGS += -Wl,-U,__scv_node0
-LDADD += -pthread
-
-NO_PROFILE = 1
-NOPROFILE = 1
-.include <bsd.lib.mk>
diff --git a/viewer/Jamfile b/viewer/Jamfile
@@ -0,0 +1,26 @@
+SubDir TOP viewer ;
+
+SUBDIRC++FLAGS = `pkg-config gl glew freetype2 --cflags` ;
+SUBDIRC++FLAGS += -I/usr/local/include ;
+SUBDIRC++FLAGS += -std=c++11 ;
+
+LINKLIBS on scv_viewer = `pkg-config gl glew freetype2 --libs` ;
+LINKLIBS on scv_viewer += -lstdc++ -lm -lglut ;
+LINK on scv_viewer = eg++ ;
+
+Main scv_viewer :
+ main.cc
+ runtime_process.cc
+ af_unix.cc
+ view.cc
+ demo-atlas.cc
+ demo-buffer.cc
+ demo-font.cc
+ demo-glstate.cc
+ demo-shader.cc
+ matrix4x4.c
+ trackball.c ;
+
+LinkLibraries scv_viewer : libglyphy ;
+
+SubInclude TOP viewer glyphy ;
diff --git a/viewer/Makefile b/viewer/Makefile
@@ -1,22 +0,0 @@
-PROG = scv_viewer
-
-SRCS = main.cc \
- runtime_process.cc \
- af_unix.cc \
- view.cc \
- demo-atlas.cc \
- demo-buffer.cc \
- demo-font.cc \
- demo-glstate.cc \
- demo-shader.cc \
- matrix4x4.c \
- trackball.c
-
-CPPFLAGS += `pkg-config gl glew freetype2 --cflags`
-CPPFLAGS += -I/usr/local/include
-CXXFLAGS += -std=c++11
-
-LDFLAGS += `pkg-config gl glew freetype2 --libs`
-LDADD += -lstdc++ -lm -lglut glyphy/libglyphy.a
-
-.include <bsd.prog.mk>
diff --git a/viewer/glyphy/Jamfile b/viewer/glyphy/Jamfile
@@ -0,0 +1,12 @@
+SubDir TOP viewer glyphy ;
+
+SubDirHdrs . ;
+SubDirC++Flags -DPKGDATADIR="" ;
+
+Library libglyphy : glyphy-arc.cc
+ glyphy-arcs.cc
+ glyphy-blob.cc
+ glyphy-extents.cc
+ glyphy-outline.cc
+ glyphy-sdf.cc
+ glyphy-shaders.cc ;
diff --git a/viewer/glyphy/Makefile b/viewer/glyphy/Makefile
@@ -1,15 +0,0 @@
-LIB = glyphy
-
-SRCS += glyphy-arc.cc \
- glyphy-arcs.cc \
- glyphy-blob.cc \
- glyphy-extents.cc \
- glyphy-outline.cc \
- glyphy-sdf.cc \
- glyphy-shaders.cc
-
-CXXFLAGS += -I. -DPKGDATADIR=""
-
-NOPROFILE=1
-NO_PROFILE=1
-.include <bsd.lib.mk>
diff --git a/wrap/Jamfile b/wrap/Jamfile
@@ -0,0 +1,3 @@
+SubDir TOP wrap ;
+
+Shell $(TOP)/wrap/scv_wrap : wrap.sh ;