summaryrefslogtreecommitdiffstats
path: root/tools/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tools/Makefile.am7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 3dce4e8..4d18c78 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,8 +1,13 @@
all-local: bin2c$(BUILD_EXEEXT)
+if CROSS_COMPILING
bin2c$(BUILD_EXEEXT): bin2c.c
- $(AM_V_CC) $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -g3 -o $@ $? -lz
+ $(AM_V_CC) $(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -g3 -o $@ $? -lz -fPIE
+else
+bin2c: bin2c.c
+ $(AM_V_CC) $(CC) $(CPPFLAGS) $(LDFLAGS) -g3 -o $@ $? -lz -fPIE
+endif
EXTRA_DIST = \
bin2c.c