Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
llvm-watermarker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nagayama15
llvm-watermarker
Commits
cad8c82e
Commit
cad8c82e
authored
Nov 22, 2018
by
nagayama15
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zlibのサンプルを追加
parent
36e07e78
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
1 deletion
+59
-1
.gitmodules
.gitmodules
+3
-0
Makefile
example/8cc/Makefile
+1
-1
Makefile
example/Makefile
+2
-0
Makefile
example/zlib/Makefile
+52
-0
zlib
example/zlib/zlib
+1
-0
No files found.
.gitmodules
View file @
cad8c82e
[submodule "example/8cc/8cc"]
[submodule "example/8cc/8cc"]
path = example/8cc/8cc
path = example/8cc/8cc
url = git://github.com/rui314/8cc.git
url = git://github.com/rui314/8cc.git
[submodule "example/zlib/zlib"]
path = example/zlib/zlib
url = git@github.com:madler/zlib.git
example/8cc/Makefile
View file @
cad8c82e
...
@@ -64,7 +64,7 @@ ${OBJ_DIR}/stage3/%.o: 8cc/%.c ${BIN_DIR}/stage2/8cc.out
...
@@ -64,7 +64,7 @@ ${OBJ_DIR}/stage3/%.o: 8cc/%.c ${BIN_DIR}/stage2/8cc.out
# Watermarked 8cc
# Watermarked 8cc
${OBJ_DIR}/stage1-wm/%.o
:
${OBJ_DIR}/stage1-wm/%-wm.ll
${OBJ_DIR}/stage1-wm/%.o
:
${OBJ_DIR}/stage1-wm/%-wm.ll
@
mkdir
-p
${
@D
}
@
mkdir
-p
${
@D
}
${
CC
}
${
CFLAGS
}
-o
$@
-c
$<
clang
${
CFLAGS
}
-o
$@
-c
$<
${OBJ_DIR}/stage1-wm/%-wm.ll
:
8cc/%.c
${OBJ_DIR}/stage1-wm/%-wm.ll
:
8cc/%.c
@
mkdir
-p
${
@D
}
@
mkdir
-p
${
@D
}
...
...
example/Makefile
View file @
cad8c82e
...
@@ -3,7 +3,9 @@
...
@@ -3,7 +3,9 @@
all
:
all
:
${
MAKE
}
-C
fizzbuzz all
${
MAKE
}
-C
fizzbuzz all
${
MAKE
}
-C
8cc all
${
MAKE
}
-C
8cc all
${
MAKE
}
-C
zlib all
test
:
test
:
${
MAKE
}
-C
fizzbuzz
test
${
MAKE
}
-C
fizzbuzz
test
${
MAKE
}
-C
8cc
test
${
MAKE
}
-C
8cc
test
${
MAKE
}
-C
zlib
test
example/zlib/Makefile
0 → 100644
View file @
cad8c82e
include
../../common.mk
WATERMARK
:=
77
CC
:=
clang
CFLAGS
:=
\
-D_LARGEFILE64_SOURCE
=
1
\
-DHAVE_HIDDEN
SRCS
:=
\
zlib/adler32.c
\
zlib/compress.c
\
zlib/crc32.c
\
zlib/deflate.c
\
zlib/gzclose.c
\
zlib/gzlib.c
\
zlib/gzread.c
\
zlib/gzwrite.c
\
zlib/inflate.c
\
zlib/infback.c
\
zlib/inftrees.c
\
zlib/inffast.c
\
zlib/trees.c
\
zlib/uncompr.c
\
zlib/zutil.c
OBJS
:=
${
SRCS
:zlib/%.c
=
${
OBJ_DIR
}
/zlib/%.o
}
OBJS_WM
:=
${
SRCS
:zlib/%.c
=
${
OBJ_DIR
}
/zlib-
${
WATERMARK
}
/%.o
}
.PHONY
:
all test
all
:
${BIN_DIR}/libz.a ${BIN_DIR}/libz-${WATERMARK}.a
test
:
${BIN_DIR}/libz.a ${BIN_DIR}/libz-${WATERMARK}.a
${BIN_DIR}/libz.a
:
${OBJS}
${BIN_DIR}/libz-${WATERMARK}.a
:
${OBJS_WM}
${OBJ_DIR}/zlib/%.o
:
zlib/%.c
@
mkdir
-p
${
@D
}
${
CC
}
${
CFLAGS
}
-o
$@
-c
$<
${OBJ_DIR}/zlib-${WATERMARK}/%.o
:
zlib/%.c
@
mkdir
-p
${
@D
}
clang
${
CFLAGS
}
-emit-llvm
-S
-o
${
@
:.o
=.ll
}
$<
opt
-load
=
${
ROOT
}
/bin/src/nykk.so
-block-wm
-watermark
=
${
WATERMARK
}
-S
-o
${
@
:%.o
=%-
${
WATERMARK
}
.ll
}
${
@
:.o
=.ll
}
2>
${
@
:%.o
=%-log.txt
}
clang
${
CFLAGS
}
-o
$@
-c
${
@
:%.o
=%-
${
WATERMARK
}
.ll
}
%.a
:
@
mkdir
-p
${
@D
}
${
AR
}
rcs
$@
$^
zlib
@
cacf7f1d
Subproject commit cacf7f1d4e3d44d871b605da3b647f07d718623f
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment