[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Need Help Writing a Rule
From: |
Bobby Dill |
Subject: |
Need Help Writing a Rule |
Date: |
Sun, 25 May 2008 19:49:51 -0700 |
I'm trying to compile qt programs with automake. I used qmake to generate a
Makefile first and then converted this into an automake file. My latest
problem involves putting images into a form. Here's qmake's version of how
to do this.
.ui/qmake_image_collection.cpp: images/filenew \
images/fileopen \
images/filesave \
images/print \
images/undo \
images/redo \
images/editcut \
images/editcopy \
images/editpaste \
images/searchfind \
images/options.png \
images/designer_widgetstack.png \
images/designer_d_table.png \
images/designer_d_iconview.png
$(UIC) -embed colortool images/filenew images/fileopen
images/filesave
images/print images/undo images/redo images/editcut images/editcopy
images/editp
aste images/searchfind images/options.png images/designer_widgetstack.png
images
/designer_d_table.png images/designer_d_iconview.png -o
.ui/qmake_image_collecti
on.cpp
****************Here's my attempt*****************
bin_PROGRAMS = colortool
%.h: %.ui
uic -o $@ $<
%.cpp: %.ui
uic -o $@ -impl $*.h $<
# This rule lets GNU make create any moc_*.cpp from the equivalent *.h
# You have one .h file, it's called myapp.h. Therefore, here I list
# its mocced name, moc_myapp.cpp.
moc_%.cpp: %.h
moc $< -o $@
%.cpp: %.png
uic -embed colortool $? -o $@
image_collection.cpp: images/designer_widgetstack.png \
images/designer_d_table.png \
images/designer_d_iconview.png
mainwinform_UI = \
mainwinform.h \
mainwinform.cpp
mainwinform.h: mainwinform.ui
mainwinform.cpp: mainwinform.ui mainwinform.h
colortool_SOURCES = main.cpp mainwinform.ui.h image_collection.cpp
noinst_HEADERS = mainwinform.h
nodist_colortool_SOURCES = moc_mainwinform.cpp $(mainwinform_UI)
BUILT_SOURCES=image_collection.cpp $(mainwinform_UI)
# set the include path found by configure
INCLUDES= $(all_includes) $(QTDIR)/include
# the library search path.
colortool_LDFLAGS = $(all_libraries) -L$(QTDIR)/lib
CLEANFILES = $(nodist_colortool_SOURCES)
When I try to compile uic is not run for my *.png files, niether before or
after. My rule must be wrong, how do I correct it?
- Need Help Writing a Rule,
Bobby Dill <=