summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-10-12 13:48:05 +0200
committerClifford Wolf <clifford@clifford.at>2014-10-12 13:48:05 +0200
commit2fdb3a4a91e2dc07f9aa75c478c6b8bfa1d1eb19 (patch)
tree0db1b3996a06c0170f85014bd68bb431a5998789 /Makefile
parent1a7684be24ba5d776c4f1f4c0889e1200c41d7b6 (diff)
Various Makefile changes for cross-compiling ABC for Win32
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 11 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 0eb5de2b..8d121c8f 100644
--- a/Makefile
+++ b/Makefile
@@ -58,6 +58,7 @@ OBJS = kernel/version_$(GIT_REV).o
# delete your work on ABC..
ABCREV = 4d547a5e065b
ABCPULL = 1
+ABCMKARGS = CC="$(CXX)" CXX="$(CXX)"
define newline
@@ -93,6 +94,8 @@ CXXFLAGS += -std=gnu++0x -Os -D_POSIX_SOURCE
CXXFLAGS := $(filter-out -fPIC,$(CXXFLAGS))
LDFLAGS := $(filter-out -rdynamic,$(LDFLAGS)) -s
LDLIBS := $(filter-out -lrt,$(LDLIBS))
+ABCMKARGS += ARCHFLAGS="-DLIN -DSIZEOF_VOID_P=4 -DSIZEOF_LONG=4 -DSIZEOF_INT=4 -DWIN32_NO_DLL -x c++ -fpermissive -w -pthread"
+ABCMKARGS += LIBS="lib/x86/pthreadVC2.lib" READLINE=0
EXE = .exe
else ifneq ($(CONFIG),none)
@@ -126,7 +129,7 @@ endif
ifeq ($(ENABLE_ABC),1)
CXXFLAGS += -DYOSYS_ENABLE_ABC
-TARGETS += yosys-abc
+TARGETS += yosys-abc$(EXE)
endif
ifeq ($(ENABLE_VERIFIC),1)
@@ -225,7 +228,7 @@ yosys-config: yosys-config.in
-e 's,@BINDIR@,$(DESTDIR)/bin,;' -e 's,@DATDIR@,$(DESTDIR)/share/yosys,;' < yosys-config.in > yosys-config
$(Q) chmod +x yosys-config
-abc/abc-$(ABCREV):
+abc/abc-$(ABCREV)$(EXE):
$(P)
ifneq ($(ABCREV),default)
$(Q) if ( cd abc 2> /dev/null && hg identify; ) | grep -q +; then \
@@ -239,14 +242,14 @@ ifneq ($(ABCREV),default)
fi
endif
$(Q) rm -f abc/abc-[0-9a-f]*
- $(Q) cd abc && $(MAKE) $(S) PROG="abc-$(ABCREV)" MSG_PREFIX="$(eval P_OFFSET = 5)$(call P_SHOW)$(eval P_OFFSET = 10) ABC: "
+ $(Q) cd abc && $(MAKE) $(S) $(ABCMKARGS) PROG="abc-$(ABCREV)$(EXE)" MSG_PREFIX="$(eval P_OFFSET = 5)$(call P_SHOW)$(eval P_OFFSET = 10) ABC: "
ifeq ($(ABCREV),default)
-.PHONY: abc/abc-$(ABCREV)
+.PHONY: abc/abc-$(ABCREV)$(EXE)
endif
-yosys-abc: abc/abc-$(ABCREV)
- $(P) cp abc/abc-$(ABCREV) yosys-abc
+yosys-abc$(EXE): abc/abc-$(ABCREV)$(EXE)
+ $(P) cp abc/abc-$(ABCREV)$(EXE) yosys-abc$(EXE)
test: $(TARGETS) $(EXTRA_TARGETS)
+cd tests/simple && bash run-test.sh
@@ -296,8 +299,8 @@ clean:
rm -f libs/*/*.d frontends/*/*.d passes/*/*.d backends/*/*.d kernel/*.d techlibs/*/*.d
clean-abc:
- make -C abc clean
- rm -f yosys-abc abc/abc-[0-9a-f]*
+ $(MAKE) -C abc clean
+ rm -f yosys-abc$(EXE) abc/abc-[0-9a-f]*
mrproper: clean
git clean -xdf