Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
netrunner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sharinigma
netrunner
Commits
ed1a3aa1
Commit
ed1a3aa1
authored
7 years ago
by
gyroninja
Browse files
Options
Downloads
Patches
Plain Diff
Added Makefile
parent
8eceeab5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+47
-0
47 additions, 0 deletions
Makefile
with
47 additions
and
0 deletions
Makefile
0 → 100644
+
47
−
0
View file @
ed1a3aa1
CXX
=
g++
CXXFLAGS
=
INCPATH
=
-I
/usr/include/freetype2
-I
/usr/include/harfbuzz
LINK
=
g++
LDFLAGS
=
LIBS
=
-lglfw
-lGL
-lGLEW
-lfreetype
-lharfbuzz
SRCDIR
=
src
OBJDIR
=
gen
DEPDIR
=
d
SOURCES
=
$(
subst ./,,
$(
shell find
.
-name
*
.cpp
))
OBJECTS
=
$(
subst
$(
SRCDIR
)
,
$(
OBJDIR
)
,
$(
SOURCES:.cpp
=
.o
))
all
:
$(SOURCES) netrunner
netrunner
:
$(OBJECTS)
$(
LINK
)
$(
LDFLAGS
)
$(
LIBS
)
-o
$@
$^
shaders
:
ifneq
($(shell cat src/graphics/opengl/shaders/FontShader.vert src/graphics/opengl/shaders/FontShader.frag src/graphics/opengl/shaders/TextureShader.vert src/graphics/opengl/shaders/TextureShader.frag | md5sum), $(shell cat src/graphics/opengl/shaders/gen/hashsum))
@
mkdir
-p
"src/graphics/opengl/shaders/gen"
@
cat
src/graphics/opengl/shaders/FontShader.vert src/graphics/opengl/shaders/FontShader.frag src/graphics/opengl/shaders/TextureShader.vert src/graphics/opengl/shaders/TextureShader.frag |
md5sum
>
src/graphics/opengl/shaders/gen/hashsum
;
@
echo
-ne
"#ifndef FONTSHADER_H
\n
#define FONTSHADER_H
\n\n
const char *fontVertexShaderSource =
\n
"
>
src/graphics/opengl/shaders/gen/FontShader.h
;
@
cat
src/graphics/opengl/shaders/FontShader.vert |
awk
'{if ($$0!="}") {print "\t\""$$0"\\n\""} else {print "\t\""$$0"\";\n"}}'
>>
src/graphics/opengl/shaders/gen/FontShader.h
;
@
echo
-ne
"const char *fontFragmentShaderSource =
\n
"
>>
src/graphics/opengl/shaders/gen/FontShader.h
;
@
cat
src/graphics/opengl/shaders/FontShader.frag |
awk
'{if ($$0!="}") {print "\t\""$$0"\\n\""} else {print "\t\""$$0"\";\n"}}'
>>
src/graphics/opengl/shaders/gen/FontShader.h
;
@
echo
-ne
"#endif
\n
"
>>
src/graphics/opengl/shaders/gen/FontShader.h
;
@
echo
-ne
"#ifndef TEXTURESHADER_H
\n
#define TEXTURESHADER_H
\n\n
const char *textureVertexShaderSource =
\n
"
>
src/graphics/opengl/shaders/gen/TextureShader.h
;
@
cat
src/graphics/opengl/shaders/TextureShader.vert |
awk
'{if ($$0!="}") {print "\t\""$$0"\\n\""} else {print "\t\""$$0"\";\n"}}'
>>
src/graphics/opengl/shaders/gen/TextureShader.h
;
@
echo
-ne
"const char *textureFragmentShaderSource =
\n
"
>>
src/graphics/opengl/shaders/gen/TextureShader.h
;
@
cat
src/graphics/opengl/shaders/TextureShader.frag |
awk
'{if ($$0!="}") {print "\t\""$$0"\\n\""} else {print "\t\""$$0"\";\n"}}'
>>
src/graphics/opengl/shaders/gen/TextureShader.h
;
@
echo
-ne
"#endif
\n
"
>>
src/graphics/opengl/shaders/gen/TextureShader.h
;
endif
$(OBJDIR)/%.o
:
$(SRCDIR)/%.cpp | shaders
@
mkdir
-p
$(
@D
)
@
mkdir
-p
$(
subst gen,d,
$(
@D
))
$(
CXX
)
-MT
$@
-MMD
-MP
-MF
$(
DEPDIR
)
/
$*
.Td
$(
CXXFLAGS
)
$(
INCPATH
)
-c
-o
$@
$<
@
mv
-f
$(
DEPDIR
)
/
$*
.Td
$(
DEPDIR
)
/
$*
.d
&&
touch
$@
$(DEPDIR)/%d
:
;
.PRECIOUS
:
$(DEPDIR)/%.d
clean
:
-
@rm
-rf
src/graphics/opengl/shaders/gen
$(
OBJDIR
)
netrunner 2>/dev/null
||
true
include
$(addsuffix .d,$(subst $(SRCDIR),$(DEPDIR),$(basename $(SOURCES))))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment