diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-03-02 12:34:51 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-03-02 12:34:51 +0100 |
commit | 6178dfbbd612d15a46c7d2a439b2252d6d0a87ba (patch) | |
tree | 0abe2fef49ac4585cc3d0f43d88e6ca9be3bea7d /iceprog/Makefile | |
parent | 0ac6a3545a17b860ed5a5bf6fcc8303418b25e5a (diff) | |
download | icestorm-6178dfbbd612d15a46c7d2a439b2252d6d0a87ba.tar.gz icestorm-6178dfbbd612d15a46c7d2a439b2252d6d0a87ba.tar.bz2 icestorm-6178dfbbd612d15a46c7d2a439b2252d6d0a87ba.zip |
Added Makefile support for "make STATIC=1"
Diffstat (limited to 'iceprog/Makefile')
-rw-r--r-- | iceprog/Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/iceprog/Makefile b/iceprog/Makefile index a124663..c618765 100644 --- a/iceprog/Makefile +++ b/iceprog/Makefile @@ -2,8 +2,14 @@ include ../config.mk LDLIBS = -L/usr/local/lib -lm CFLAGS = -MD -O0 -ggdb -Wall -std=c99 -I/usr/local/include +ifeq ($(STATIC),1) +LDFLAGS += -static +LDLIBS += $(shell for pkg in libftdi libftdi1; do $(PKG_CONFIG) --silence-errors --static --libs $$pkg && exit; done; echo -lftdi; ) +CFLAGS += $(shell for pkg in libftdi libftdi1; do $(PKG_CONFIG) --silence-errors --static --cflags $$pkg && exit; done; ) +else LDLIBS += $(shell for pkg in libftdi libftdi1; do $(PKG_CONFIG) --silence-errors --libs $$pkg && exit; done; echo -lftdi; ) CFLAGS += $(shell for pkg in libftdi libftdi1; do $(PKG_CONFIG) --silence-errors --cflags $$pkg && exit; done; ) +endif all: iceprog$(EXE) |