automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

windres compilation rule


From: John Ratliff
Subject: windres compilation rule
Date: Tue, 27 Sep 2005 01:40:34 -0500

I'm trying to make a windows rc file compile in a cross-platform program. I
have a rule, but it doesn't seem to work with automake.

The problem is that if I put the rc object file in a subdirectory, automake
still looks for it in the main directory, even though I have subdir-objects
turned on.

This is my Makefile.am

.rc.o:
        windres @WX_INCLUDES@ -o $@ $<
    
.xrc.cc:
        wxrc -c -o $@ $<

AUTOMAKE_OPTIONS = subdir-objects
EXTRA_DIST = res/icon32x32.ico res/icon32x32.xpm \
        res/alphabet.xpm res/mpg.xrc
CLEANFILES = res/mpg.cc

bin_PROGRAMS = mpg

mpg_SOURCES = AppConstants.hh \
        MPGApp.cc MPGApp.hh \
        exceptions/InvalidPasswordException.cc \
        exceptions/InvalidPasswordException.hh \
        model/Password.cc model/Password.hh \
        view/MPGFrame.cc view/MPGFrame.hh \
        view/PasswordPanel.cc view/PasswordPanel.hh

nodist_mpg_SOURCES = res/mpg.cc

if WINDOWS
        mpg_SOURCES += res/windows.rc
endif

It will compile compile windows.rc into windows.o and it's in the res
directory, but when linking, make complains that there is no rule to build
windows.o.

make[2]: *** No rule to make target `windows.o', needed by `mpg.exe'.  Stop.
make[2]: Leaving directory `/home/jdratlif/mpg/source'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jdratlif/mpg'
make: *** [all] Error 2

If I put the windows.rc file in the main source directory rather than in the
res subdirectory, it will work fine (replacing res/windows.rc with
windows.rc of course).

Is there a way to specify that windows.o is in the res directory, or do I
need to use SUBDIRS and a Makefile.am in res?

Thanks,

John Ratliff







reply via email to

[Prev in Thread] Current Thread [Next in Thread]