commit f35198931212cd008d4dd2ce7c426cab99a67e0d
parent 8acc519882c8bca5706b7fdc81fff181f19f3603
Author: Dan Callaghan <djc@djc.id.au>
Date: Sun, 30 May 2010 12:23:40 +1000
scons > make
--HG--
rename : Makefile => SConstruct
Diffstat:
2 files changed, 9 insertions(+), 23 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,23 +0,0 @@
-CXXFLAGS = -O2 -g -Wall -fmessage-length=0 $(shell pkg-config giomm-2.4 --cflags) $(shell pkg-config gtkmm-2.4 --cflags) $(shell pkg-config exiv2 --cflags)
-LDFLAGS = -Wl,-O1 -Wl,--as-needed
-OBJS = xmpedit.o MainWindow.o MetadataTreeModel.o MetadataTreeView.o
-LIBS = $(shell pkg-config giomm-2.4 --libs) $(shell pkg-config gtkmm-2.4 --libs) $(shell pkg-config exiv2 --libs)
-TARGET = xmpedit
-
-$(TARGET): $(OBJS)
- $(CXX) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
-
-xmpedit.o: xmpedit.cpp MainWindow.h
-
-MainWindow.o: MainWindow.cpp MainWindow.h MetadataTreeModel.h MetadataTreeView.h
-
-MetadataTreeModel.o: MetadataTreeModel.cpp MetadataTreeModel.h
-
-MetadataTreeView.o: MetadataTreeView.cpp MetadataTreeView.h MetadataTreeModel.h
-
-.PHONY: all
-all: $(TARGET)
-
-.PHONY: clean
-clean:
- rm -f $(OBJS) $(TARGET)
diff --git a/SConstruct b/SConstruct
@@ -0,0 +1,9 @@
+
+import os
+env = Environment(CFLAGS=os.environ.get('CFLAGS', '').split() + ['-Wall', '-ggdb'])
+env['CXXFLAGS'] = env['CFLAGS']
+env.ParseConfig('pkg-config --cflags --libs gtkmm-2.4')
+env.ParseConfig('pkg-config --cflags --libs giomm-2.4')
+env.ParseConfig('pkg-config --cflags --libs exiv2')
+env.Decider('timestamp-match')
+env.Program('xmpedit', Glob('*.cpp'))