1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/Makefile.in Tue Jul 24 23:53:34 2012 -0700
1.3 @@ -0,0 +1,96 @@
1.4 +#vim: set ft=make:
1.5 +
1.6 +CXX=@CXX@
1.7 +CXXFLAGS=@CXXFLAGS@
1.8 +srcdir=@srcdir@
1.9 +VPATH=${srcdir}
1.10 +TOOLS=${srcdir}/../build
1.11 +CXXVENDOR=@CXXVENDOR@
1.12 +PLATFORM="@PLATFORM@"
1.13 +NULL =
1.14 +
1.15 +INCLUDES +=
1.16 +CXXFLAGS += $(INCLUDES)
1.17 +BASECXXFLAGS = -Wall -Werror -Wno-null-arithmetic -Wno-invalid-offsetof -g3 -O0
1.18 +
1.19 +CPPSRCS = \
1.20 + Array.cpp \
1.21 + BytecodeCompiler.cpp \
1.22 + BytecodeEmitter.cpp \
1.23 + CompileContext.cpp \
1.24 + Exception.cpp \
1.25 + FixedArray.cpp \
1.26 + Functions.cpp \
1.27 + Heap.cpp \
1.28 + Interpreter.cpp \
1.29 + Modules.cpp \
1.30 + NameBinding.cpp \
1.31 + Parser.cpp \
1.32 + Opcodes.cpp \
1.33 + PoolAllocator.cpp \
1.34 + Reference.cpp \
1.35 + RootScopes.cpp \
1.36 + Scanner.cpp \
1.37 + Scopes.cpp \
1.38 + SemanticAnalysis.cpp \
1.39 + Spaces.cpp \
1.40 + Stack.cpp \
1.41 + TypeManager.cpp \
1.42 + Types.cpp \
1.43 + Zone.cpp \
1.44 + main.cpp \
1.45 + $(NULL)
1.46 +
1.47 +ifeq ("darwin", $(PLATFORM))
1.48 +CPPSRCS += \
1.49 + Platform-Posix.cpp \
1.50 + $(NULL)
1.51 +endif
1.52 +ifeq ("linux", $(PLATFORM))
1.53 +CPPSRCS += \
1.54 + Platform-Posix.cpp \
1.55 + $(NULL)
1.56 +endif
1.57 +
1.58 +default: all
1.59 +
1.60 +OBJECTS := $(CPPSRCS:%.cpp=%.o)
1.61 +
1.62 +ifeq ($(CXXVENDOR), microsoft)
1.63 +
1.64 +CXXFLAGS += /DWIN32 /D_WINDOWS
1.65 +
1.66 +%.o: %.cpp
1.67 + $(CXX) $(CXXFLAGS) /Fo$@ /c /TP /nologo $<
1.68 +else
1.69 +
1.70 +%.o: %.cpp
1.71 + $(CXX) $(BASECXXFLAGS) $(CXXFLAGS) -c -o $@ -Wp,-MD,.deps/$(patsubst %.o,%.d,$@) $<
1.72 +
1.73 +endif
1.74 +
1.75 +#$(CXX) $(BASECXXFLAGS) $(CXXFLAGS) -c -o $@ -Wp,-MD,.deps/$(basename $(@F)).pp $<
1.76 +
1.77 +DEPEND_FILES := $(strip $(wildcard .deps/*.d))
1.78 +
1.79 +ifneq (,$(DEPEND_FILES))
1.80 +DEPEND_RESULTS = $(shell $(TOOLS)/mddepend.pl - $(DEPEND_FILES))
1.81 +$(eval $(DEPEND_RESULTS))
1.82 +endif
1.83 +
1.84 +all: foobar
1.85 +
1.86 +foobar: libfoobar.a main.o
1.87 + $(CXX) main.o libfoobar.a -lpthread -o foobar
1.88 +
1.89 +libfoobar.a: $(OBJECTS)
1.90 + $(AR) -crs libfoobar.a $(OBJECTS)
1.91 +
1.92 +FORCE:
1.93 +
1.94 +clean:
1.95 + rm -f .deps/*.d
1.96 + rm -f *.o
1.97 + rm -f libfoobar.a
1.98 + rm -f foobar
1.99 +