1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 22:43:17 +02:00

BSD refinements

Make it easier to compile flashrom under NetBSD and DragonFlyBSD:
 - Use /usr/pkg/ as prefix for includes and linking
 - Use pciutils as include path for the right(tm) libpci

Also, fix date handling in getrevision.sh to work with the various formats for
invoking 'date'. This also uses svn's info --xml output instead of the regular one.

Corresponding to flashrom svn r1742.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Tested-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
This commit is contained in:
Stefan Tauner
2013-09-12 15:48:39 +00:00
parent 4442b81fd8
commit c65b8555d5
4 changed files with 56 additions and 10 deletions

View File

@ -98,6 +98,16 @@ CPPFLAGS += -I/usr/local/include
LDFLAGS += -L/usr/local/lib
endif
ifeq ($(TARGET_OS), NetBSD)
CPPFLAGS += -I/usr/pkg/include
LDFLAGS += -L/usr/pkg/lib
endif
ifeq ($(TARGET_OS), DragonFlyBSD)
CPPFLAGS += -I/usr/pkg/include
LDFLAGS += -L/usr/pkg/lib
endif
ifeq ($(TARGET_OS), DOS)
EXEC_SUFFIX := .exe
CPPFLAGS += -I$(DOSLIBS_BASE)/libgetopt
@ -743,7 +753,11 @@ endif
define LIBPCI_TEST
/* Avoid a failing test due to libpci header symbol shadowing breakage */
#define index shadow_workaround_index
#if !defined __NetBSD__ && !defined __DragonFly__
#include <pci/pci.h>
#else
#include <pciutils/pci.h>
#endif
struct pci_access *pacc;
int main(int argc, char **argv)
{