The trick then is to add
BUILT_SOURCES = resource.hin your Makefile/Makefile.am as all files mentioned as
BUILT_SOURCES
will be built before any of the normal compilation rules run.This is what we do in WDI (Windows Driver Installer) for libusb 1.0 with a Makefile.am that looks like:
BUILT_SOURCES = resource.h lib_LTLIBRARIES = libusb-wdi.la LIB_SRC = resource.h infs.h usbi.h installer.h installer_library.h installer_library.c libusb_wdi_la_CFLAGS = $(VISIBILITY_CFLAGS) $(AM_CFLAGS) -L../../libusb/libusb/.libs -lusb-1.0 libusb_wdi_la_SOURCES = $(LIB_SRC) resource.h: ../embedder/embedder.exe resource.h clean-local: -rm -rf resource.h
No comments:
Post a Comment