O HAI THIS BLOG PURPZIEZ 2 B UZED AZ MAH PLESIOUS MEM. :)

2009/03/15

Ypsilon.Makefile.karma--;

Ypsilon,R^6RSなscheme,GCがアレでメニィコアによろしいらしい.
Makefileより,
#   Makefile for Linux, FreeBSD, OpenBSD, and Darwin
# Requirements: GNU Make, GCC 4.0 or later
# Options: DESTDIR, PREFIX, DATAMODEL(ILP32/LP64), USE_SDL(ON)

PROG = ypsilon

PREFIX = /usr/local

CPPFLAGS = -DNDEBUG -DSYSTEM_SHARE_PATH='"$(DESTDIR)$(PREFIX)/share/$(PROG)"'

CXXFLAGS = -pipe -x c++ -O3 -fstrict-aliasing -fomit-frame-pointer -momit-leaf-frame-pointer

SRCS = file.cpp main.cpp vm0.cpp object_heap_compact.cpp subr_flonum.cpp vm1.cpp object_set.cpp \
subr_hash.cpp vm2.cpp object_slab.cpp subr_list.cpp interpreter.cpp serialize.cpp \
vm3.cpp port.cpp subr_others.cpp arith.cpp printer.cpp subr_port.cpp subr_r5rs_arith.cpp \
equiv.cpp reader.cpp ffi.cpp subr_base.cpp bag.cpp \
subr_unicode.cpp hash.cpp subr_base_arith.cpp ucs4.cpp ioerror.cpp subr_bitwise.cpp utf8.cpp \
main.cpp subr_bvector.cpp violation.cpp object_factory.cpp \
subr_ffi.cpp object_heap.cpp subr_fixnum.cpp bit.cpp list.cpp fasl.cpp socket.cpp subr_socket.cpp

VPATH = src

UNAME = $(shell uname -a)

ifndef DATAMODEL
ifeq ($(shell echo | $(CXX) -E -dM - | grep '__LP64__'), )
DATAMODEL = ILP32
else
DATAMODEL = LP64
endif
endif

ifneq (, $(findstring Linux, $(UNAME)))
ifeq ($(shell $(CXX) -dumpspecs | grep 'march=native'), )
ifeq ($(DATAMODEL), ILP32)
CXXFLAGS += -march=i686
endif
else
CXXFLAGS += -march=native
endif
ifeq ($(shell grep -i sse2 /proc/cpuinfo), )
CXXFLAGS += -msse
else
CXXFLAGS += -msse2
endif
CXXFLAGS += -mfpmath=sse -pthread
ifeq ($(DATAMODEL), ILP32)
CPPFLAGS += -DDEFAULT_HEAP_LIMIT=32
CXXFLAGS += -m32
LDFLAGS = -m32
ASFLAGS = --32
SRCS += ffi_stub_linux.s
else
CPPFLAGS += -DDEFAULT_HEAP_LIMIT=64
CXXFLAGS += -m64
LDFLAGS = -m64
ASFLAGS = --64
SRCS += ffi_stub_linux64.s
endif
LDLIBS = -lpthread -ldl
endif

ifneq (, $(findstring FreeBSD, $(UNAME)))
ifeq ($(shell $(CXX) -dumpspecs | grep 'march=native'), )
ifeq ($(DATAMODEL), ILP32)
CXXFLAGS += -march=i686
endif
else
CXXFLAGS += -march=native
endif
ifeq ($(shell dmesg | grep -i sse2), )
CXXFLAGS += -msse
else
CXXFLAGS += -msse2
endif
CXXFLAGS += -mfpmath=sse -pthread
CPPFLAGS += -D__LITTLE_ENDIAN__
ifeq ($(DATAMODEL), ILP32)
CPPFLAGS += -DDEFAULT_HEAP_LIMIT=32
CXXFLAGS += -m32
LDFLAGS = -m32
ASFLAGS = --32
SRCS += ffi_stub_freebsd.s
else
CPPFLAGS += -DDEFAULT_HEAP_LIMIT=64
CXXFLAGS += -m64
LDFLAGS = -m64
ASFLAGS = --64
SRCS += ffi_stub_freebsd64.s
endif
LDLIBS = -pthread
endif

ifneq (, $(findstring OpenBSD, $(UNAME)))
ifeq ($(shell $(CXX) -dumpspecs | grep 'march=native'), )
ifeq ($(DATAMODEL), ILP32)
CXXFLAGS += -march=i686
endif
else
CXXFLAGS += -march=native
endif
ifeq ($(shell dmesg | grep -i sse2), )
CXXFLAGS += -msse
else
CXXFLAGS += -msse2
endif
CXXFLAGS += -mfpmath=sse -pthread
CPPFLAGS += -D__LITTLE_ENDIAN__ -DNO_TLS
ifeq ($(DATAMODEL), ILP32)
CPPFLAGS += -DDEFAULT_HEAP_LIMIT=32
CXXFLAGS += -m32
LDFLAGS = -m32
ASFLAGS = --32
SRCS += ffi_stub_openbsd.s
else
CPPFLAGS += -DDEFAULT_HEAP_LIMIT=64
CXXFLAGS += -m64
LDFLAGS = -m64
ASFLAGS = --64
SRCS += ffi_stub_openbsd64.s
endif
LDLIBS = -pthread
endif

ifneq (, $(findstring Darwin, $(UNAME)))
CXXFLAGS += -arch i386 -msse2 -mfpmath=sse
CPPFLAGS += -DNO_TLS
SRCS += ffi_stub_darwin.s
ifneq (, $(USE_SDL))
CPPFLAGS += -DUSE_SDL
LDFLAGS = extension/SDL/darwin/i386/SDLmain.o -framework SDL -framework Cocoa
endif
endif

[SNIP]

clean:
rm -f *.o *.d
rm -f $(HOME)/.ypsilon/*.cache
rm -f $(HOME)/.ypsilon/*.time

[SNIP]

x86/amd64大好きらしい,cleanは$(HOME)までお掃除する親切設計. :DDD

0 件のコメント: