Created parser and interfaces for creating specific parsers for specific
[qshowdiff.git] / src / Makefile
blob5ba02d17f5b4eea642dfea20b550ce8b77635e9a
1 CC = g++
2 CXXFLAGS = -Wall -Wno-long-long -pedantic
3 DEBUGFLAGS = -g
4 QT_INCLUDE = -DQT_SHARED -I/opt/qt4/include -I/opt/qt4/include/QtCore \
5 -I/opt/qt4/include/QtGui
6 QT_LIBS = -lQtCore -lQtGui -L/opt/qt4/lib/ -lz -lm -pthread -lgthread-2.0 \
7 -lrt -lglib-2.0 -lpthread -ldl
8 QT_LIBS = -lQtGui -L/opt/qt4-debug/lib -L/usr/X11R6/lib \
9 -laudio -lXt -lpng -lSM -lICE -lQtCore -lz -pthread \
10 -lgthread-2.0 -lrt -lglib-2.0 -lpthread -lXi -lXrender -lXrandr -lXfixes \
11 -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lm -ldl
13 ALL_FLAGS = $(CXXFLAGS) $(DEBUGFLAGS) $(QT_INCLUDE)
14 ALL_LD_FLAGS = $(QT_LIBS)
17 VPATH = diff qt parser
19 TARGETS = qshowdiff
21 DIFF_OBJS = snippet.o diff.o file.o hunk.o text.o
22 QT_OBJS = diff_view.o main_window.o
23 PARSER_OBJS = parser.o
25 OBJS_TMP = main.o settings.o $(DIFF_OBJS) $(QT_OBJS) $(PARSER_OBJS)
26 OBJS = $(foreach file, $(OBJS_TMP), objs/$(file))
28 all: $(TARGETS)
30 qshowdiff: $(OBJS)
31 $(CC) $(ALL_FLAGS) -o $@ $(OBJS) $(ALL_LD_FLAGS)
33 objs/%.o: %.cpp %.h
34 $(CC) $(ALL_FLAGS) -c -o $@ $<
35 objs/%.o: %.cpp
36 $(CC) $(ALL_FLAGS) -c -o $@ $<
38 #qt/diff_view.cpp: qt/diff_view.moc
39 #qt/diff_view.moc: qt/diff_view.h
40 # moc -p'.' $< > $@
42 clean:
43 rm -f objs/*.o
44 rm -f $(TARGETS)
45 rm -f *.moc
46 rm -f */*.moc
48 .PHONY: all clean