Added upstream version.
[vlp.git] / edit / mfile
1 ####### 
2 #######  Change the INCDIR, LFLAGS and MOC
3
4 INCDIR = $(QINC)
5 CFLAGS = -O2 -fno-strength-reduce -Wall -W -I/usr/X11R6/include
6 LIBCFLAGS = -fPIC
7 YACCCFLAGS = -Wno-unused -Wno-parentheses
8 LFLAGS =  -L$(QLIB) -lqt
9 CC = g++
10 MOC = $(MOCDIR)/moc
11 SHELL = /bin/sh
12
13
14 ####### Files
15
16 HEADERS =       editor.h
17 SOURCES =       editor.cpp 
18 OBJECTS =       editor.o 
19 SRCMOC  =       moc_editor.cpp
20 OBJMOC  =       moc_editor.o
21 TARGET  =       logedit 
22
23 ####### Implicit rules
24
25 .SUFFIXES: .cpp .c
26
27 .cpp.o:
28         $(CC) -c $(CFLAGS) -I$(INCDIR) -o $@ $<
29
30 .c.o:
31         $(CC) -c $(CFLAGS) -I$(INCDIR) -o $@ $<
32
33 ####### Build rules
34
35 all: $(TARGET) 
36
37 $(TARGET): $(OBJECTS) $(OBJMOC)
38         $(CC) $(OBJECTS) $(OBJMOC) -o $(TARGET) $(LFLAGS) 
39
40 moc: $(SRCMOC)
41
42 clean:
43         -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(TARGET)
44
45 ####### Compile
46
47 editor.o: editor.cpp \
48                 editor.h
49
50
51 moc_editor.o: moc_editor.cpp \
52                 editor.h
53
54 moc_editor.cpp: editor.h
55         $(MOC) editor.h -o moc_editor.cpp