commit c6a86cfdea95e67daed2ea801f9243ff96fd785a
parent f786e6283985aea4087e162bbf6168bd434eed87
Author: Dan Callaghan <djc@djc.id.au>
Date: Thu, 25 Dec 2008 17:00:36 +1000
fixed up Makefile
Diffstat:
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,15 +1,21 @@
-CXXFLAGS = -O2 -g -Wall -fmessage-length=0 $(shell pkg-config gtkmm-2.4 --cflags) $(shell pkg-config exiv2 --cflags)
+CXXFLAGS = -O2 -g -Wall -fmessage-length=0 $(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
+LIBS = $(shell pkg-config gtkmm-2.4 --libs) $(shell pkg-config exiv2 --libs)
+TARGET = xmpedit
-OBJS = xmpedit.o MainWindow.o MetadataTreeModel.o
+$(TARGET): $(OBJS)
+ $(CXX) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
-LIBS = $(shell pkg-config gtkmm-2.4 --libs) $(shell pkg-config exiv2 --libs)
+xmpedit.o: xmpedit.cpp MainWindow.h
-TARGET = xmpedit
+MainWindow.o: MainWindow.cpp MainWindow.h MetadataTreeModel.h
-$(TARGET): $(OBJS)
- $(CXX) -o $(TARGET) $(OBJS) $(LIBS)
+MetadataTreeModel.o: MetadataTreeModel.cpp MetadataTreeModel.h
-all: $(TARGET)
+.PHONY: all
+all: $(TARGET)
+.PHONY: clean
clean:
rm -f $(OBJS) $(TARGET)