File: Makefile

package info (click to toggle)
marote 2.4-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 556 kB
  • ctags: 224
  • sloc: cpp: 1,925; makefile: 46
file content (226 lines) | stat: -rw-r--r-- 4,901 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
#############################################################################
# Makefile for building: marote
# Generated by qmake (1.07a) (Qt 3.3.3) on: Sat Jan 22 23:24:34 2005
# Project:  marote.pro
# Template: app
# Command: $(QMAKE) -o Makefile marote.pro
#############################################################################

####### Compiler, tools and options
QTDIR=/usr/share/qt3
CC       = gcc
CXX      = g++
LEX      = flex
YACC     = yacc
CFLAGS   = -pipe -Wall -W -O3 -pipe -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
CXXFLAGS = -pipe -Wall -W -O3 -pipe -D_REENTRANT  -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
LEXFLAGS = 
YACCFLAGS= -d
INCPATH  = -I/usr/qt/3/mkspecs/linux-g++ -I. -I$(QTDIR)/include
LINK     = g++
LFLAGS   =
LIBS     = $(SUBLIBS) -L$(QTDIR)/lib -L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm -lpthread
AR       = ar cqs
RANLIB   = 
MOC      = $(QTDIR)/bin/moc
UIC      = $(QTDIR)/bin/uic
QMAKE    = qmake
TAR      = tar -cf
GZIP     = gzip -9f
COPY     = cp -f
COPY_FILE= $(COPY)
COPY_DIR = $(COPY) -r
INSTALL_FILE= $(COPY_FILE)
INSTALL_DIR = $(COPY_DIR)
DEL_FILE = rm -f
SYMLINK  = ln -sf
DEL_DIR  = rmdir
MOVE     = mv -f
CHK_DIR_EXISTS= test -d
MKDIR    = mkdir -p

####### Output directory

OBJECTS_DIR = ./

####### Files

HEADERS = k2.h \
		findpowermate.h \
		pwrmate.h \
		k2_thr.h \
		xlogger.h
SOURCES = main.cpp \
		pwrmate.cpp \
		findpowermate.cpp \
		k2.cpp \
		k2_thr.cpp \
		xlogger.cpp
OBJECTS = main.o \
		pwrmate.o \
		findpowermate.o \
		k2.o \
		k2_thr.o \
		xlogger.o \
		form2.o \
		qmake_image_collection.o
FORMS = form2.ui
UICDECLS = form2.h
UICIMPLS = form2.cpp
SRCMOC   = moc_pwrmate.cpp \
		moc_k2_thr.cpp \
		moc_form2.cpp
OBJMOC = moc_pwrmate.o \
		moc_k2_thr.o \
		moc_form2.o
DIST	   = marote.pro
QMAKE_TARGET = marote
DESTDIR  = 
TARGET   = marote

first: all
####### Implicit rules

.SUFFIXES: .c .o .cpp .cc .cxx .C

.cpp.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cc.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.cxx.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.C.o:
	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<

.c.o:
	$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

####### Build rules

all: Makefile $(TARGET)

$(TARGET):  $(UICDECLS) $(OBJECTS) $(OBJMOC)  
	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(OBJCOMP) $(LIBS)

mocables: $(SRCMOC)
uicables: $(UICDECLS) $(UICIMPLS)

$(MOC): 
	( cd $(QTDIR)/src/moc && $(MAKE) )

Makefile: marote.pro  /usr/share/qt3/mkspecs/default/qmake.conf 
	$(QMAKE) -o Makefile marote.pro
qmake: 
	@$(QMAKE) -o Makefile marote.pro

dist: 
	@mkdir -p .tmp/marote && $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) .tmp/marote/ && $(COPY_FILE) --parents left.png right.png grnDot.png redDot.png grnBtn.png blueDot.png greenLED.png redLED.png yellowLED.png k2bkgnd.png .tmp/marote/ && $(COPY_FILE) --parents form2.ui.h .tmp/marote/ && ( cd `dirname .tmp/marote` && $(TAR) marote.tar marote && $(GZIP) marote.tar ) && $(MOVE) `dirname .tmp/marote`/marote.tar.gz . && $(DEL_FILE) -r .tmp/marote

mocclean:
	-$(DEL_FILE) $(OBJMOC)
	-$(DEL_FILE) $(SRCMOC)

uiclean:
	-$(DEL_FILE) $(UICIMPLS) $(UICDECLS)

yaccclean:
lexclean:
clean: mocclean uiclean
	-$(DEL_FILE) $(OBJECTS)
		-$(DEL_FILE) qmake_image_collection.cpp
	-$(DEL_FILE) *~ core *.core


####### Sub-libraries

distclean: clean
	-$(DEL_FILE) $(TARGET) $(TARGET)


FORCE:

####### Compile

main.o: main.cpp form2.h \
		logform.h \
		pwrmate.h \
		k2_thr.h \
		xlogger.h \
		findpowermate.h \
		k2.h

pwrmate.o: pwrmate.cpp pwrmate.h \
		findpowermate.h

findpowermate.o: findpowermate.cpp findpowermate.h

k2.o: k2.cpp k2.h

k2_thr.o: k2_thr.cpp k2_thr.h \
		k2.h

xlogger.o: xlogger.cpp xlogger.h

form2.h: form2.ui pwrmate.h \
		k2_thr.h \
		xlogger.h \
		logform.h \
		findpowermate.h \
		k2.h
	$(UIC) form2.ui -o form2.h

form2.cpp: form2.h form2.ui pwrmate.h \
		k2_thr.h \
		xlogger.h \
		logform.h \
		findpowermate.h \
		k2.h
	$(UIC) form2.ui -i form2.h -o form2.cpp

form2.o: form2.cpp form2.ui.h \
		form2.h

moc_pwrmate.o: moc_pwrmate.cpp  pwrmate.h findpowermate.h

moc_k2_thr.o: moc_k2_thr.cpp  k2_thr.h k2.h

moc_form2.o: moc_form2.cpp  form2.h pwrmate.h \
		k2_thr.h \
		xlogger.h \
		logform.h \
		findpowermate.h \
		k2.h

moc_pwrmate.cpp: $(MOC) pwrmate.h
	$(MOC) pwrmate.h -o moc_pwrmate.cpp

moc_k2_thr.cpp: $(MOC) k2_thr.h
	$(MOC) k2_thr.h -o moc_k2_thr.cpp

moc_form2.cpp: $(MOC) form2.h
	$(MOC) form2.h -o moc_form2.cpp

qmake_image_collection.o: qmake_image_collection.cpp

qmake_image_collection.cpp: left.png \
		right.png \
		grnDot.png \
		redDot.png \
		grnBtn.png \
		blueDot.png \
		greenLED.png \
		redLED.png \
		yellowLED.png \
		k2bkgnd.png
	$(UIC)  -embed marote left.png right.png grnDot.png redDot.png grnBtn.png blueDot.png greenLED.png redLED.png yellowLED.png k2bkgnd.png -o qmake_image_collection.cpp

####### Install

install:  
	install -s marote $(DESTDIR)/usr/bin

uninstall: