summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2013-09-12 15:48:39 +0000
committerstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2013-09-12 15:48:39 +0000
commitf56d3011031d30a1caa20463f7f8d84751af5f80 (patch)
tree38e32d281cb3e396de0ae7783ed71fce2d9c9ff5 /Makefile
parent6e943c728875013b786d98c829dfca37347aeded (diff)
downloadflashrom-f56d3011031d30a1caa20463f7f8d84751af5f80.tar.gz
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. Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> Tested-by: Idwer Vollering <vidwer@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1742 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ff26439..346d46a 100644
--- a/Makefile
+++ b/Makefile
@@ -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)
{