mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
initial checkin, nothing much to see here.
Swift SVN r4
This commit is contained in:
83
Makefile
Normal file
83
Makefile
Normal file
@@ -0,0 +1,83 @@
|
||||
##===- Makefile --------------------------------------------*- Makefile -*-===##
|
||||
#
|
||||
# This source file is part of the Swift.org open source project
|
||||
#
|
||||
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
|
||||
# Licensed under Apache License v2.0 with Runtime Library Exception
|
||||
#
|
||||
# See http://swift.org/LICENSE.txt for license information
|
||||
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
# If SWIFT_LEVEL is not set, then we are the top-level Makefile. Otherwise, we
|
||||
# are being included from a subdirectory makefile.
|
||||
|
||||
ifndef SWIFT_LEVEL
|
||||
|
||||
IS_TOP_LEVEL := 1
|
||||
SWIFT_LEVEL := .
|
||||
DIRS := lib tools # include docs
|
||||
|
||||
PARALLEL_DIRS :=
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(MAKECMDGOALS),libs-only)
|
||||
DIRS := $(filter-out tools docs, $(DIRS))
|
||||
OPTIONAL_DIRS :=
|
||||
endif
|
||||
|
||||
###
|
||||
# Common Makefile code, shared by all Swift Makefiles.
|
||||
|
||||
# Set LLVM source root level.
|
||||
LEVEL := $(SWIFT_LEVEL)/../..
|
||||
|
||||
# Include LLVM common makefile.
|
||||
include $(LEVEL)/Makefile.common
|
||||
|
||||
# Set common Swift build flags.
|
||||
CPP.Flags += -I$(PROJ_SRC_DIR)/$(SWIFT_LEVEL)/include \
|
||||
-I$(PROJ_OBJ_DIR)/$(SWIFT_LEVEL)/include
|
||||
ifdef SWIFT_VENDOR
|
||||
CPP.Flags += -DSWIFT_VENDOR='"$(SWIFT_VENDOR) "'
|
||||
endif
|
||||
|
||||
###
|
||||
# Swift Top Level specific stuff.
|
||||
|
||||
ifeq ($(IS_TOP_LEVEL),1)
|
||||
|
||||
ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
|
||||
$(RecursiveTargets)::
|
||||
$(Verb) if [ ! -f test/Makefile ]; then \
|
||||
$(MKDIR) test; \
|
||||
$(CP) $(PROJ_SRC_DIR)/test/Makefile test/Makefile; \
|
||||
fi
|
||||
endif
|
||||
|
||||
test::
|
||||
@ $(MAKE) -C test
|
||||
|
||||
report::
|
||||
@ $(MAKE) -C test report
|
||||
|
||||
clean::
|
||||
@ $(MAKE) -C test clean
|
||||
|
||||
libs-only: all
|
||||
|
||||
tags::
|
||||
$(Verb) etags `find . -type f -name '*.h' -or -name '*.cpp' | \
|
||||
grep -v /lib/Headers | grep -v /test/`
|
||||
|
||||
cscope.files:
|
||||
find tools lib include -name '*.cpp' \
|
||||
-or -name '*.def' \
|
||||
-or -name '*.td' \
|
||||
-or -name '*.h' > cscope.files
|
||||
|
||||
.PHONY: test report clean cscope.files
|
||||
|
||||
endif
|
||||
2
lib/Lex/Lexer.cpp
Normal file
2
lib/Lex/Lexer.cpp
Normal file
@@ -0,0 +1,2 @@
|
||||
int X;
|
||||
|
||||
23
lib/Lex/Makefile
Normal file
23
lib/Lex/Makefile
Normal file
@@ -0,0 +1,23 @@
|
||||
##===- swift/lib/Lex/Makefile ------------------------------*- Makefile -*-===##
|
||||
#
|
||||
# This source file is part of the Swift.org open source project
|
||||
#
|
||||
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
|
||||
# Licensed under Apache License v2.0 with Runtime Library Exception
|
||||
#
|
||||
# See http://swift.org/LICENSE.txt for license information
|
||||
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
#
|
||||
# This implements the Lexer library for the C-Language front-end.
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
SWIFT_LEVEL := ../..
|
||||
include $(SWIFT_LEVEL)/../../Makefile.config
|
||||
|
||||
LIBRARYNAME := swiftLex
|
||||
|
||||
include $(SWIFT_LEVEL)/Makefile
|
||||
|
||||
17
lib/Makefile
Executable file
17
lib/Makefile
Executable file
@@ -0,0 +1,17 @@
|
||||
##===- lib/Makefile ----------------------------------------*- Makefile -*-===##
|
||||
#
|
||||
# This source file is part of the Swift.org open source project
|
||||
#
|
||||
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
|
||||
# Licensed under Apache License v2.0 with Runtime Library Exception
|
||||
#
|
||||
# See http://swift.org/LICENSE.txt for license information
|
||||
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
SWIFT_LEVEL := ..
|
||||
|
||||
PARALLEL_DIRS = Lex Parse
|
||||
|
||||
include $(SWIFT_LEVEL)/Makefile
|
||||
|
||||
19
lib/Parse/Makefile
Normal file
19
lib/Parse/Makefile
Normal file
@@ -0,0 +1,19 @@
|
||||
##===- swift/lib/Parse/Makefile ----------------------------*- Makefile -*-===##
|
||||
#
|
||||
# This source file is part of the Swift.org open source project
|
||||
#
|
||||
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
|
||||
# Licensed under Apache License v2.0 with Runtime Library Exception
|
||||
#
|
||||
# See http://swift.org/LICENSE.txt for license information
|
||||
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
SWIFT_LEVEL := ../..
|
||||
include $(SWIFT_LEVEL)/../../Makefile.config
|
||||
|
||||
LIBRARYNAME := swiftParse
|
||||
|
||||
include $(SWIFT_LEVEL)/Makefile
|
||||
|
||||
1
lib/Parse/Parser.cpp
Normal file
1
lib/Parse/Parser.cpp
Normal file
@@ -0,0 +1 @@
|
||||
int x;
|
||||
18
tools/Makefile
Normal file
18
tools/Makefile
Normal file
@@ -0,0 +1,18 @@
|
||||
##===- tools/Makefile --------------------------------------*- Makefile -*-===##
|
||||
#
|
||||
# This source file is part of the Swift.org open source project
|
||||
#
|
||||
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
|
||||
# Licensed under Apache License v2.0 with Runtime Library Exception
|
||||
#
|
||||
# See http://swift.org/LICENSE.txt for license information
|
||||
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
SWIFT_LEVEL := ..
|
||||
DIRS := swift
|
||||
|
||||
include $(SWIFT_LEVEL)/../../Makefile.config
|
||||
|
||||
include $(SWIFT_LEVEL)/Makefile
|
||||
28
tools/swift/Makefile
Normal file
28
tools/swift/Makefile
Normal file
@@ -0,0 +1,28 @@
|
||||
##===- tools/swift/Makefile -------------------------------*- Makefile -*-===##
|
||||
#
|
||||
# This source file is part of the Swift.org open source project
|
||||
#
|
||||
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
|
||||
# Licensed under Apache License v2.0 with Runtime Library Exception
|
||||
#
|
||||
# See http://swift.org/LICENSE.txt for license information
|
||||
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
||||
#
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
||||
SWIFT_LEVEL := ../..
|
||||
|
||||
TOOLNAME = swift
|
||||
|
||||
# Include this here so we can get the configuration of the targets that have
|
||||
# been configured for construction. We have to do this early so we can set up
|
||||
# LINK_COMPONENTS before including Makefile.rules
|
||||
include $(SWIFT_LEVEL)/../../Makefile.config
|
||||
|
||||
LINK_COMPONENTS := $(TARGETS_TO_BUILD) bitwriter codegen ipo selectiondag
|
||||
#USEDLIBS = clangFrontend.a clangDriver.a clangCodeGen.a clangSema.a \
|
||||
# clangChecker.a clangAnalysis.a clangRewrite.a clangAST.a \
|
||||
# clangParse.a clangLex.a clangBasic.a
|
||||
|
||||
include $(SWIFT_LEVEL)/Makefile
|
||||
|
||||
3
tools/swift/swift.cpp
Normal file
3
tools/swift/swift.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
int main() {
|
||||
}
|
||||
Reference in New Issue
Block a user