Skip to content

Commit afc81c1

Browse files
committedJul 18, 2010
initial checkin, nothing much to see here.
Swift SVN r4
1 parent 18844bc commit afc81c1

File tree

9 files changed

+194
-0
lines changed

9 files changed

+194
-0
lines changed
 

‎Makefile

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
##===- Makefile --------------------------------------------*- Makefile -*-===##
2+
#
3+
# This source file is part of the Swift.org open source project
4+
#
5+
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
6+
# Licensed under Apache License v2.0 with Runtime Library Exception
7+
#
8+
# See http://swift.org/LICENSE.txt for license information
9+
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
#
11+
##===----------------------------------------------------------------------===##
12+
13+
# If SWIFT_LEVEL is not set, then we are the top-level Makefile. Otherwise, we
14+
# are being included from a subdirectory makefile.
15+
16+
ifndef SWIFT_LEVEL
17+
18+
IS_TOP_LEVEL := 1
19+
SWIFT_LEVEL := .
20+
DIRS := lib tools # include docs
21+
22+
PARALLEL_DIRS :=
23+
24+
endif
25+
26+
ifeq ($(MAKECMDGOALS),libs-only)
27+
DIRS := $(filter-out tools docs, $(DIRS))
28+
OPTIONAL_DIRS :=
29+
endif
30+
31+
###
32+
# Common Makefile code, shared by all Swift Makefiles.
33+
34+
# Set LLVM source root level.
35+
LEVEL := $(SWIFT_LEVEL)/../..
36+
37+
# Include LLVM common makefile.
38+
include $(LEVEL)/Makefile.common
39+
40+
# Set common Swift build flags.
41+
CPP.Flags += -I$(PROJ_SRC_DIR)/$(SWIFT_LEVEL)/include \
42+
-I$(PROJ_OBJ_DIR)/$(SWIFT_LEVEL)/include
43+
ifdef SWIFT_VENDOR
44+
CPP.Flags += -DSWIFT_VENDOR='"$(SWIFT_VENDOR) "'
45+
endif
46+
47+
###
48+
# Swift Top Level specific stuff.
49+
50+
ifeq ($(IS_TOP_LEVEL),1)
51+
52+
ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
53+
$(RecursiveTargets)::
54+
$(Verb) if [ ! -f test/Makefile ]; then \
55+
$(MKDIR) test; \
56+
$(CP) $(PROJ_SRC_DIR)/test/Makefile test/Makefile; \
57+
fi
58+
endif
59+
60+
test::
61+
@ $(MAKE) -C test
62+
63+
report::
64+
@ $(MAKE) -C test report
65+
66+
clean::
67+
@ $(MAKE) -C test clean
68+
69+
libs-only: all
70+
71+
tags::
72+
$(Verb) etags `find . -type f -name '*.h' -or -name '*.cpp' | \
73+
grep -v /lib/Headers | grep -v /test/`
74+
75+
cscope.files:
76+
find tools lib include -name '*.cpp' \
77+
-or -name '*.def' \
78+
-or -name '*.td' \
79+
-or -name '*.h' > cscope.files
80+
81+
.PHONY: test report clean cscope.files
82+
83+
endif

‎lib/Lex/Lexer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
int X;
2+

‎lib/Lex/Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
##===- swift/lib/Lex/Makefile ------------------------------*- Makefile -*-===##
2+
#
3+
# This source file is part of the Swift.org open source project
4+
#
5+
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
6+
# Licensed under Apache License v2.0 with Runtime Library Exception
7+
#
8+
# See http://swift.org/LICENSE.txt for license information
9+
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
#
11+
##===----------------------------------------------------------------------===##
12+
#
13+
# This implements the Lexer library for the C-Language front-end.
14+
#
15+
##===----------------------------------------------------------------------===##
16+
17+
SWIFT_LEVEL := ../..
18+
include $(SWIFT_LEVEL)/../../Makefile.config
19+
20+
LIBRARYNAME := swiftLex
21+
22+
include $(SWIFT_LEVEL)/Makefile
23+

‎lib/Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
##===- lib/Makefile ----------------------------------------*- Makefile -*-===##
2+
#
3+
# This source file is part of the Swift.org open source project
4+
#
5+
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
6+
# Licensed under Apache License v2.0 with Runtime Library Exception
7+
#
8+
# See http://swift.org/LICENSE.txt for license information
9+
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
#
11+
##===----------------------------------------------------------------------===##
12+
SWIFT_LEVEL := ..
13+
14+
PARALLEL_DIRS = Lex Parse
15+
16+
include $(SWIFT_LEVEL)/Makefile
17+

‎lib/Parse/Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
##===- swift/lib/Parse/Makefile ----------------------------*- Makefile -*-===##
2+
#
3+
# This source file is part of the Swift.org open source project
4+
#
5+
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
6+
# Licensed under Apache License v2.0 with Runtime Library Exception
7+
#
8+
# See http://swift.org/LICENSE.txt for license information
9+
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
#
11+
##===----------------------------------------------------------------------===##
12+
13+
SWIFT_LEVEL := ../..
14+
include $(SWIFT_LEVEL)/../../Makefile.config
15+
16+
LIBRARYNAME := swiftParse
17+
18+
include $(SWIFT_LEVEL)/Makefile
19+

‎lib/Parse/Parser.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
int x;

‎tools/Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
##===- tools/Makefile --------------------------------------*- Makefile -*-===##
2+
#
3+
# This source file is part of the Swift.org open source project
4+
#
5+
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
6+
# Licensed under Apache License v2.0 with Runtime Library Exception
7+
#
8+
# See http://swift.org/LICENSE.txt for license information
9+
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
#
11+
##===----------------------------------------------------------------------===##
12+
13+
SWIFT_LEVEL := ..
14+
DIRS := swift
15+
16+
include $(SWIFT_LEVEL)/../../Makefile.config
17+
18+
include $(SWIFT_LEVEL)/Makefile

‎tools/swift/Makefile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
##===- tools/swift/Makefile -------------------------------*- Makefile -*-===##
2+
#
3+
# This source file is part of the Swift.org open source project
4+
#
5+
# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
6+
# Licensed under Apache License v2.0 with Runtime Library Exception
7+
#
8+
# See http://swift.org/LICENSE.txt for license information
9+
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
#
11+
##===----------------------------------------------------------------------===##
12+
13+
SWIFT_LEVEL := ../..
14+
15+
TOOLNAME = swift
16+
17+
# Include this here so we can get the configuration of the targets that have
18+
# been configured for construction. We have to do this early so we can set up
19+
# LINK_COMPONENTS before including Makefile.rules
20+
include $(SWIFT_LEVEL)/../../Makefile.config
21+
22+
LINK_COMPONENTS := $(TARGETS_TO_BUILD) bitwriter codegen ipo selectiondag
23+
#USEDLIBS = clangFrontend.a clangDriver.a clangCodeGen.a clangSema.a \
24+
# clangChecker.a clangAnalysis.a clangRewrite.a clangAST.a \
25+
# clangParse.a clangLex.a clangBasic.a
26+
27+
include $(SWIFT_LEVEL)/Makefile
28+

‎tools/swift/swift.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
int main() {
3+
}

0 commit comments

Comments
 (0)