Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
91 lines (63 sloc) 2.89 KB
# -*- Mode: Makefile ; Coding: utf-8 -*-
SRCTOP=../..
include $(SRCTOP)/Makefile.inc
TARGET = MOSH
INSTDIR = $(BINDIR)/APPS
INSTDIR = $(BINDIR)/APPS/$(TARGET).APP
include mona/Makefile.src.inc
include mona/Makefile.gc.inc
include mona/Makefile.onig.inc
ADDTARGETDEP = $(ONIG_DIR) $(BOEHM_GC_DIR)
ADDLINKDEP = $(ONIG_OBJECTS) $(GC_OBJECTS)
ADDLINK = $(ONIG_OBJECTS) $(GC_OBJECTS) -lssl-imp -lcrypto-imp -lgmp-imp -l monalibc-imp --enable-auto-import
ADDCFLAGS = -D USE_BOEHM_GC -D PACKAGE_VERSION="\"0.2.6\"" -DMOSH_LIB_PATH="\"/LIBS/MOSH/\"" -U__CYGWIN32__ -mno-stack-arg-probe -DDEBUG_VERSION -DLINE_FEED_CODE_LF=1 -O3 -momit-leaf-frame-pointer -fomit-frame-pointer -march=i686 #-msse2 -mfpmath=sse
ADDINCLUDE = -I ./extlibs/onig-5.9.2 -I $(BOEHM_GC_DIR)/include
CLEANFILES = $(ONIG_OBJECTS) $(GC_OBJECTS) .BOOT
ONIG_OBJECTS = $(ONIG_SOURCES:.c=.o)
INSTFILES = MOSH.map mona/all-tests.scm
top_srcdir = "."
include $(SHAREDIR)/configs/monapi-exe.inc
$(ONIG_OBJECTS) : $(ONIG_DIR)/config.h
$(ONIG_DIR)/config.h : mona/onig_config.h
cp $< $@
.PHONY : gen
GEN_FILES = src/Instruction.h src/labels.cpp src/Object-accessors.h src/OSConstants.h src/Reader.tab.cpp src/NumberReader.tab.cpp src/cprocedures.cpp
gen: .BOOT $(GEN_FILES)
$(SOURCES): $(GEN_FILES)
.BOOT:
@if [ ! -f $@ ]; then touch $@; ./gen-git-build.sh; fi
src/Instruction.h: src/instruction.scm
mosh $(top_srcdir)/misc/scripts/gen-insn.scm $< $@
src/main.cpp: src/psyntax_mosh_image.cpp src/baselib.h src/match.h
src/labels.cpp: src/instruction.scm
mosh $(top_srcdir)/misc/scripts/gen-label.scm $< $@
src/cprocedures.cpp: boot/free-vars-decl.scm
mosh $(top_srcdir)/misc/scripts/gen-cproc.scm $< $@
src/all-tests.scm: src/test-data.scm
(cd $(top_srcdir) && mosh -5 misc/scripts/gen-test.scm src/test-data.scm src/all-tests.scm)
# echo 'run -5 misc/scripts/gen-test.scm test-data.scm all-tests.scm ' | gdb ./mosh
src/Object-accessors.h: src/accessors.scm
(cd $(top_srcdir) && mosh misc/scripts/gen-accessors.scm) > $@
src/OSConstants.h: src/os-constants.scm
(cd $(top_srcdir) && mosh misc/scripts/gen-os-constants.scm) > $@
src/Reader.tab.cpp : src/Reader.y
bison -d $< -o $@
src/NumberReader.tab.cpp : src/NumberReader.y
bison -p "number_yy" -d $< -o $@
src/Scanner.cpp : src/scanner.re src/Reader.tab.hpp
re2c -u $< > $@ # -d is debug option
src/NumberScanner.cpp : src/NumberScanner.re src/NumberReader.tab.hpp
re2c -cu $< > $@ # -d is debug option
install:all
mkdir -p $(INSTDIR)
cp -fpr tests $(INSTDIR)
rm -rf $(INSTDIR)/r6rs-test-suite
mv $(INSTDIR)/tests/r6rs-test-suite $(INSTDIR)/ # Avoid too long path longer than 64
$(INSTALL) $(TARGET).EXE $(INSTFILES) $(INSTDIR)
mkdir -p $(BINDIR)/LIBS/MOSH/lib
cp -pr ./lib/ $(BINDIR)/LIBS/MOSH/lib/
(cd mona && cp -pr ./bin $(BINDIR)/LIBS/MOSH/)
depend dependencies:
$(CXX) -MM $(INCLUDE) $(CXXFLAGS) $(SOURCES) >> dependencies
sed -i 's/^.*:/src\/&/' ./dependencies
-include dependencies
Something went wrong with that request. Please try again.