Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Throwback: drop scons for make

  • Loading branch information...
commit b66c59ed85c6cb412717f68b8aef46a54950e55f 1 parent 6fde9d8
@paulrosania paulrosania authored committed
Showing with 19 additions and 62 deletions.
  1. +1 −5 .gitignore
  2. +18 −0 Makefile
  3. +0 −57 SConstruct
View
6 .gitignore
@@ -1,8 +1,4 @@
-
-.sconf_temp/
-.sconsign.dblite
-config.log
-
*.o
+*.a
mount-gridfs
View
18 Makefile
@@ -0,0 +1,18 @@
+CC=g++
+CCOPTS=-D_FILE_OFFSET_BITS=64 -I. -I/usr/local/include
+LDOPTS=-L/usr/local/lib -L. -lmongoclient -lfuse -lboost_thread-mt -lboost_filesystem-mt -lboost_system-mt
+
+mount_gridfs : operations.o local_gridfile.o main.o options.o
+ $(CC) $(LDOPTS) -o mount_gridfs main.o operations.o options.o local_gridfile.o
+
+operations.o :
+ $(CC) $(CCOPTS) -c operations.cpp
+
+local_gridfile.o :
+ $(CC) $(CCOPTS) -c local_gridfile.cpp
+
+main.o :
+ $(CC) $(CCOPTS) -c main.cpp
+
+options.o :
+ $(CC) $(CCOPTS) -c options.cpp
View
57 SConstruct
@@ -1,57 +0,0 @@
-# -*- mode: python; -*-
-import os
-
-env = Environment()
-env.Append(CPPFLAGS=['-D_FILE_OFFSET_BITS=64'])
-
-fuse_lib = "fuse"
-
-if 'darwin' == os.sys.platform:
- env.Append(CPPPATH=['/opt/local/include'],
- LIBPATH=['/opt/local/lib'])
-
- if os.uname()[2] == '10.0.0':
- # Snow Leopard uses 64 bit inodes
- fuse_lib += '_ino64'
-env.Append(CPPPATH=['/opt/mongo/include'], LIBPATH=['/opt/mongo/lib'])
-
-conf = Configure( env )
-libs = [ "mongoclient" , fuse_lib ]
-boostLibs = [ "thread" , "filesystem" ]
-
-def checkLib( n ):
- if conf.CheckLib( n ):
- return True
- print( "Error: can't find library: " + str( n ) )
- Exit(-1)
- return False
-
-for x in libs:
- checkLib( x )
-
-def makeBoost( x ):
- # this will have to get more complicated later
- return "boost_" + x + "-mt";
-
-for x in boostLibs:
- checkLib( makeBoost( x ) )
-
-conf.CheckLib( makeBoost( "system" ) )
-
-env = conf.Finish()
-
-files = ['main.cpp', 'operations.cpp', 'options.cpp', 'local_gridfile.cpp']
-
-env.Program('mount_gridfs', files)
-
-def runUnitTest(env, target, source):
- import subprocess
- app = str(source[0].abspath)
- if not subprocess.call(app):
- open(str(target[0]), 'w').write("PASSED\n")
-
-test_target = env.Command('tests.passed', 'tests/basic.py', runUnitTest)
-env.Alias("test", "tests.passed")
-env.Depends(test_target, 'mount_gridfs')
-
-env.Default(['mount_gridfs'])
Please sign in to comment.
Something went wrong with that request. Please try again.