From a6eca59683e0b711f2111882e8e50688f28147a1 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 20 Apr 2011 15:32:26 -0400 Subject: [PATCH] build driver program as well --- .gitignore | 1 + Makefile.driver | 18 ------------------ SConstruct | 4 ++-- driver.cc | 11 ++--------- 4 files changed, 5 insertions(+), 29 deletions(-) create mode 100644 .gitignore delete mode 100644 Makefile.driver diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e54525b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +driver diff --git a/Makefile.driver b/Makefile.driver deleted file mode 100644 index b6432bd..0000000 --- a/Makefile.driver +++ /dev/null @@ -1,18 +0,0 @@ - -CXX := g++ -CXXFLAGS := -O2 -SOURCE := WFObj.cc driver.cc -OBJS := $(SOURCE:.cc=.o) -LDFLAGS := -lGL -TARGET := driver - -all: $(TARGET) - -$(TARGET): $(OBJS) - $(CXX) -o $@ $^ $(LDFLAGS) - -%.o: %.cc %.hh - $(CXX) -c -o $@ $< $(CXXFLAGS) - -clean: - -rm -f *~ *.o $(TARGET) diff --git a/SConstruct b/SConstruct index 784d308..1fec302 100644 --- a/SConstruct +++ b/SConstruct @@ -1,6 +1,6 @@ # vim:filetype=python -env = Environment() +env = Environment(LIBS = ['GL']) -env.Object('WFObj', 'WFObj.cc') +env.Program('driver', Glob('*.cc')) diff --git a/driver.cc b/driver.cc index eeb8d54..7bda701 100644 --- a/driver.cc +++ b/driver.cc @@ -1,15 +1,9 @@ #include #include -#include "WFObj.hh" +#include "WFObj.h" using namespace std; -GLuint loadTexture(const char * texture) -{ - cout << "got texture request: '" << texture << "'" << endl; - return 33; -} - int main(int argc, char * argv[]) { WFObj w; @@ -18,11 +12,10 @@ int main(int argc, char * argv[]) cout << "Usage: " << argv[0] << " " << endl; return -2; } - if (!w.load(argv[1], &loadTexture)) + if (!w.load(argv[1])) { cout << "Couldn't open '" << argv[1] << "'!" << endl; return -1; } - w.render(); return 0; }