summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBaruch Sterin <baruchs@gmail.com>2018-03-30 01:03:04 -0700
committerBaruch Sterin <baruchs@gmail.com>2018-03-30 01:03:04 -0700
commit9c78efbadfe1936107aacc5dff6092062c1b3896 (patch)
treed57eca758e4863338d42d225daaa67e11ca36fd0 /Makefile
parent4a39f3265f2db7d22bfc9915c87d16f3837f5c85 (diff)
downloadabc-9c78efbadfe1936107aacc5dff6092062c1b3896.tar.gz
abc-9c78efbadfe1936107aacc5dff6092062c1b3896.tar.bz2
abc-9c78efbadfe1936107aacc5dff6092062c1b3896.zip
Makefile: add support for ABC_USE_STDINT_H
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3ca76f5f..c59cf117 100644
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,13 @@ $(ARCHFLAGS_EXE) : arch_flags.c
INCLUDES += -I$(ABCSRC)/src
-ARCHFLAGS ?= $(shell $(CC) $(ABCSRC)/arch_flags.c -o $(ARCHFLAGS_EXE) && $(ARCHFLAGS_EXE))
+# Use C99 stdint.h header for platform-dependent types
+ifdef ABC_USE_STDINT_H
+ ARCHFLAGS ?= -DABC_USE_STDINT_H=1
+else
+ ARCHFLAGS ?= $(shell $(CC) $(ABCSRC)/arch_flags.c -o $(ARCHFLAGS_EXE) && $(ARCHFLAGS_EXE))
+endif
+
ARCHFLAGS := $(ARCHFLAGS)
OPTFLAGS ?= -g -O