[Top][All Lists]

[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

        windres @WX_INCLUDES@ -o $@ $<
        wxrc -c -o $@ $<

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

bin_PROGRAMS = mpg

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

nodist_mpg_SOURCES = res/

        mpg_SOURCES += res/windows.rc

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

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 in res?


John Ratliff

reply via email to

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