Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • demetrius/netrunner
  • despair/netrunner
  • antpy/netrunner
  • dylanbaughercontact/netrunner
  • okn3/netrunner
  • geertiebear/netrunner
  • mechacrash/netrunner
  • vaartis/netrunner
  • flat/netrunner
9 results
Show changes
Commits on Source (450)
Showing with 341 additions and 165919 deletions
...@@ -10,3 +10,21 @@ src/networking/URI ...@@ -10,3 +10,21 @@ src/networking/URI
*.user *.user
NetRunner2008.ncb NetRunner2008.ncb
*.suo *.suo
*.id*
*.nam
*.til
*.dbg
/glew32.dll
/libgcc_s_sjlj-1.dll
/libssp-0.dll
/libstdc++-6.dll
/netrunner.exe
.vscode
*.res*
*.aps
/glfw3.dll
/libfreetype-6.dll
/libharfbuzz-0.dll
/out.txt
ntr-test-cfg.exe
*.o
UNAME := $(shell uname)
CXX = gpp
CC = gcc
GIT_VERSION := $(shell cat version.git)
PLATFORM := $(MACHTYPE)
CXXFLAGS = -O3 -march=i486 -flto=8 -DVERSION=\"$(GIT_VERSION)\" -DPLATFORM=\"$(PLATFORM)\" -fpermissive -fstack-protector-strong
CFLAGS = -O3 -flto=8 -march=i486 -std=c11 -DVERSION=\"$(GIT_VERSION)\" -fstack-protector-strong
CWARN = -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused
WARNINGS = -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused -Wzero-as-null-pointer-constant -Wuseless-cast
LIBS = -lglfw -lGL -lGLEW -lharfbuzz -lpolarssl -lwatt -lnx11 -lnano-x -lfreetype2 -lpthread -Ld:/djgpp/lib
LDFLAGS = -O3 -flto=8 -march=i486 -fstack-protector-strong
INCPATH = -Ideps/include
MD5SUM = md5sum
EXECUTABLE = netrunner
LINK = gpp
SRCDIR = src
OBJDIR = gen
DEPDIR = d
SOURCES = $(subst ./,,$(shell find src -name *.cpp))
OBJECTS = $(subst $(SRCDIR),$(OBJDIR),$(SOURCES:.cpp=.o))
all: $(SOURCES) netrunner
netrunner: $(OBJECTS) $(OBJDIR)/tlsf.o
$(LINK) $(LDFLAGS) -o $@ $^ stub.o $(LIBS)
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
@mkdir -p $(@D)
@mkdir -p $(subst gen,d,$(@D))
$(CXX) -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td $(CXXFLAGS) $(INCPATH) $(WARNINGS) -c -o $@ $<
@mv $(DEPDIR)/$*.Td $(DEPDIR)/$*.d
touch $@
$(OBJDIR)/tlsf.o: $(SRCDIR)/tlsf.c
$(CC) $(INCPATH) $(CWARN) -DTLSF_USE_LOCKS=0 -DUSE_SBRK=1 -c -o $@ $<
$(DEPDIR)/%d: ;
.PRECIOUS: $(DEPDIR)/%.d
test-url.o: tests/testPrograms/URLtest.cpp
$(CXX) -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td $(CXXFLAGS) $(INCPATH) $(WARINGS) -c -o $@ $<
ntr-run-tests: test-url.o $(OBJDIR)/URL.o $(OBJDIR)/StringUtils.o
$(LINK) $(LDFLAGS) -o $@ test-url.o $(OBJDIR)/URL.o $(OBJDIR)/StringUtils.o $(LIBS)
clean:
-@rm -rf src/graphics/opengl/shaders/gen $(OBJDIR) $(EXECUTABLE) 2> NUL | true
include $(addsuffix .d,$(subst $(SRCDIR),$(DEPDIR),$(basename $(SOURCES))))
UNAME := $(shell uname) UNAME := $(shell uname)
CXX = g++ CXX = g++
CC = gcc
GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags) GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags)
PLATFORM := $(shell g++ -dumpmachine)
CXXFLAGS = -O3 -flto=8 -std=c++14 -DVERSION=\"$(GIT_VERSION)\" CXXFLAGS = -O3 -flto=8 -std=c++14 -DVERSION=\"$(GIT_VERSION)\" -DPLATFORM=\"$(PLATFORM)\"
WARNINGS = -Werror -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused -Wzero-as-null-pointer-constant -Wuseless-cast CFLAGS = -O3 -flto=8 -std=c11 -DVERSION=\"$(GIT_VERSION)\"
CWARN = -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused
WARNINGS = -Werror -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused -Wzero-as-null-pointer-constant -Wuseless-cast -Wno-strict-overflow
LIBS = -lglfw -lGL -lGLEW -lfreetype -lharfbuzz -lmbedtls -lmbedcrypto -lmbedx509 LIBS = -lglfw -lGL -lGLEW -lfreetype -lharfbuzz -lmbedtls -lmbedcrypto -lmbedx509
LDFLAGS = -O3 -flto=8 LDFLAGS = -O3 -flto=8
INCPATH = -I /usr/include/freetype2 -I /usr/include/harfbuzz INCPATH = -I./deps/include # Usable headers are in ./deps - you still need the libraries installed in the usual places
MD5SUM = md5sum
ifeq ($(UNAME), Darwin) ifeq ($(UNAME), Darwin)
CXXFLAGS = -O3 -std=c++1y -DVERSION=\"$(GIT_VERSION)\" CXXFLAGS = -O3 -std=c++1y -DVERSION=\"$(GIT_VERSION)\" -DPLATFORM=\"$(PLATFORM)\"
CFLAGS = -O3 -std=c11 -DVERSION=\"$(GIT_VERSION)\"
WARNINGS = WARNINGS =
LIBS = -L/usr/local/lib -lglfw3 -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lGLEW -lfreetype -lharfbuzz -lmbedtls -lmbedcrypto -lmbedx509 ifeq ("$(wildcard /usr/local/lib/libglfw3.dylib)","")
LDFLAGS = -O3 LIBS = -lglfw3 -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lGLEW -lfreetype -lharfbuzz -lmbedtls -lmbedcrypto -lmbedx509
INCPATH = -I /usr/local/include -I /usr/local/include/freetype2 -I /usr/local/include/harfbuzz else
ifeq ("$(wildcard /usr/local/lib/libglfw.3.dylib)","")
LIBS = -lglfw.3 -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lGLEW -lfreetype -lharfbuzz -lmbedtls -lmbedcrypto -lmbedx509
else
LIBS = -lglfw -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lGLEW -lfreetype -lharfbuzz -lmbedtls -lmbedcrypto -lmbedx509
endif
endif
LDFLAGS = -O3 -L/usr/local/lib
INCPATH = -I./deps/include
MD5SUM = md5
endif endif
EXECUTABLE = netrunner EXECUTABLE = netrunner
...@@ -24,59 +39,65 @@ SRCDIR = src ...@@ -24,59 +39,65 @@ SRCDIR = src
OBJDIR = gen OBJDIR = gen
DEPDIR = d DEPDIR = d
SOURCES = $(subst ./,,$(shell find src -name *.cpp)) PREFIX = /usr/local
RESPREFIX = /usr/local/share
SOURCES = $(subst ./,,$(shell find src -name \*.cpp))
OBJECTS = $(subst $(SRCDIR),$(OBJDIR),$(SOURCES:.cpp=.o)) OBJECTS = $(subst $(SRCDIR),$(OBJDIR),$(SOURCES:.cpp=.o))
RES = res/
all: $(SOURCES) netrunner all: $(SOURCES) netrunner
netrunner: $(OBJECTS) netrunner: $(OBJECTS) $(OBJDIR)/platform/tlsf.o $(OBJDIR)/platform/slre.o
$(LINK) $(LDFLAGS) -o $@ $^ $(LIBS) $(LINK) $(LDFLAGS) -o $@ $^ $(LIBS)
# make make 3.81 happy (since it can't parse any echo parameters) $(OBJDIR)/%.o: $(SRCDIR)/%.cpp
ifeq ($(UNAME), Darwin)
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"
@echo "#ifndef FONTSHADER_H\n#define FONTSHADER_H\n\nconst 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 "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 "#endif\n" >> src/graphics/opengl/shaders/gen/FontShader.h;
@echo "#ifndef TEXTURESHADER_H\n#define TEXTURESHADER_H\n\nconst 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 "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 "#endif\n" >> src/graphics/opengl/shaders/gen/TextureShader.h;
@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;
endif
else
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;
@/bin/echo -ne "#ifndef FONTSHADER_H\n#define FONTSHADER_H\n\nconst 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;
@/bin/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;
@/bin/echo -ne "#endif\n" >> src/graphics/opengl/shaders/gen/FontShader.h;
@/bin/echo -ne "#ifndef TEXTURESHADER_H\n#define TEXTURESHADER_H\n\nconst 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;
@/bin/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;
@/bin/echo -ne "#endif\n" >> src/graphics/opengl/shaders/gen/TextureShader.h;
endif
endif
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp | shaders
@mkdir -p $(@D) @mkdir -p $(@D)
@mkdir -p $(subst gen,d,$(@D)) @mkdir -p $(subst gen,d,$(@D))
$(CXX) -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td $(CXXFLAGS) $(INCPATH) $(WARNINGS) -c -o $@ $< $(CXX) -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td $(CXXFLAGS) $(INCPATH) $(WARNINGS) -c -o $@ $<
@mv -f $(DEPDIR)/$*.Td $(DEPDIR)/$*.d && touch $@ @mv -f $(DEPDIR)/$*.Td $(DEPDIR)/$*.d && touch $@
$(OBJDIR)/platform/tlsf.o: $(SRCDIR)/platform/tlsf.c
$(CC) $(INCPATH) $(CWARN) -DTLSF_USE_LOCKS=0 -DUSE_MMAP=1 -DUSE_SBRK=1 -c -o $@ $<
$(OBJDIR)/platform/slre.o: $(SRCDIR)/platform/slre.c
$(CC) $(INCPATH) $(CWARN) -c -o $@ $<
$(DEPDIR)/%d: ; $(DEPDIR)/%d: ;
.PRECIOUS: $(DEPDIR)/%.d .PRECIOUS: $(DEPDIR)/%.d
test-jscpp.o: tests/testPrograms/JSParserTest.cpp
$(CXX) -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td $(CXXFLAGS) $(INCPATH) $(WARINGS) -c -o $@ $<
test-js: test-jscpp.o $(OBJDIR)/parsers/scripting/javascript/JSParser.o $(OBJDIR)/tools/StringUtils.o
$(LINK) $(LDFLAGS) -o $@ test-jscpp.o $(OBJDIR)/parsers/scripting/javascript/JSParser.o $(OBJDIR)/tools/StringUtils.o $(LIBS)
test-url.o: tests/testPrograms/URLtest.cpp
$(CXX) -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td $(CXXFLAGS) $(INCPATH) $(WARINGS) -c -o $@ $<
ntr-run-tests: test-url.o $(OBJDIR)/tools/URL.o $(OBJDIR)/tools/StringUtils.o
$(LINK) $(LDFLAGS) -o $@ test-url.o $(OBJDIR)/URL.o $(OBJDIR)/tools/StringUtils.o $(LIBS)
ntr-test-cfg: test-cfg.o $(OBJDIR)/tools/CFGFileParser.o $(OBJDIR)/platform/slre.o $(OBJDIR)/platform/tlsf.o $(OBJDIR)/platform/Murmur3.o
$(LINK) $(LDFLAGS) -o $@ $^ $(LIBS)
test-cfg.o: tests/TestCFG.cpp
$(CXX) -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td $(CXXFLAGS) -Isrc $(INCPATH) -DDEBUG $(WARNINGS) -c -o $@ $<
clean: clean:
-@rm -rf src/graphics/opengl/shaders/gen $(OBJDIR) $(EXECUTABLE) 2>/dev/null || true -@rm -rf $(OBJDIR) $(EXECUTABLE) 2>/dev/null || true
.PHONY: install
install: netrunner
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp $< $(DESTDIR)$(PREFIX)/bin/netrunner
mkdir -p $(DESTDIR)$(RESPREFIX)/netrunner
cp -R $(RES) $(DESTDIR)$(RESPREFIX)/netrunner/
.PHONY: uninstall
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/netrunner
rm -rf $(DESTDIR)$(RESPREFIX)/netrunner
include $(addsuffix .d,$(subst $(SRCDIR),$(DEPDIR),$(basename $(SOURCES)))) include $(addsuffix .d,$(subst $(SRCDIR),$(DEPDIR),$(basename $(SOURCES))))
UNAME := $(shell uname) UNAME := $(shell uname)
CXX = g++ CXX = g++
CC = gcc
GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags) GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags)
ifdef DEBUG ifdef DEBUG
CXXFLAGS = -Og -g3 -fstack-protector-strong -fPIE -std=c++14 -DVERSION=\"$(GIT_VERSION)\" CXXFLAGS = -O0 -g3 -fstack-protector-strong -fPIE -std=c++14 -DVERSION=\"$(GIT_VERSION)\" -DDEBUG
CFLAGS = -O0 -g3 -fstack-protector-strong -fPIE -std=c11 -DVERSION=\"$(GIT_VERSION)\" -DDEBUG
else
ifdef RELEASE_PACK
CXXFLAGS = -O3 -march=i686 -mtune=generic -fstack-protector-strong -fPIE -flto=8 -std=c++14 -DVERSION=\"$(GIT_VERSION)\"
CFLAGS = -O3 -march=i686 -mtune=generic -fstack-protector-strong -fPIE -flto=8 -std=c11 -DVERSION=\"$(GIT_VERSION)\"
else else
CXXFLAGS = -O3 -march=core2 -mfpmath=sse -fstack-protector-strong -fPIE -flto=8 -std=c++14 -DVERSION=\"$(GIT_VERSION)\" CXXFLAGS = -O3 -march=core2 -mfpmath=sse -fstack-protector-strong -fPIE -flto=8 -std=c++14 -DVERSION=\"$(GIT_VERSION)\"
CFLAGS = -O3 -march=core2 -mfpmath=sse -fstack-protector-strong -fPIE -flto=8 -std=c11 -DVERSION=\"$(GIT_VERSION)\"
endif
endif
ifdef AMD64_DEBUG
CXXFLAGS = -O0 -g3 -fstack-protector-strong -fPIE -std=c++14 -DVERSION=\"$(GIT_VERSION)\" -DDEBUG
CFLAGS = -O0 -g3 -fstack-protector-strong -fPIE -std=c11 -DVERSION=\"$(GIT_VERSION)\" -DDEBUG
else
ifdef AMD64_RELEASE
CXXFLAGS = -O3 -march=opteron -mtune=opteron -mfpmath=sse -fstack-protector-strong -fPIE -flto=8 -std=c++14 -DVERSION=\"$(GIT_VERSION)\"
CFLAGS = -O3 -march=opteron -mtune=opteron -mfpmath=sse -fstack-protector-strong -fPIE -flto=8 -std=c11 -DVERSION=\"$(GIT_VERSION)\"
else
ifdef AMD64
CXXFLAGS = -O3 -march=core2 -mfpmath=sse -fstack-protector-strong -fPIE -flto=8 -std=c++14 -DVERSION=\"$(GIT_VERSION)\"
CFLAGS = -O3 -march=core2 -mfpmath=sse -fstack-protector-strong -fPIE -std=c11 -DVERSION=\"$(GIT_VERSION)\" -flto=8
endif
endif
endif endif
WARNINGS = -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused -Wzero-as-null-pointer-constant -Wuseless-cast WARNINGS = -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused -Wzero-as-null-pointer-constant -Wuseless-cast
LIBS = -lglfw -lopenGL32 -lGLEW32 -lgdi32 -lpolarssl -lws2_32 -lharfbuzz -lfreetype -lpng -lbz2 -lz CWARN = -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused
ifndef DEBUG
LDFLAGS = -L ./deps/lib -O3 -flto=8 -march=core2 -mfpmath=sse -fstack-protector-strong -fPIE # i686 builds
ifdef DEBUG
LIBS = -lglfw3 -lopenGL32 -lGLEW32 -lgdi32 -lpolarssl -lws2_32 -lharfbuzz-0 -lfreetype-6
LDFLAGS = -L ./deps/lib/nt_i386 -O0 -g3 -fstack-protector-strong -fPIE
else
ifdef RELEASE_PACK
LIBS = -lglfw3 -lopenGL32 -lGLEW32 -lgdi32 -lpolarssl -lws2_32 -lharfbuzz-0 -lfreetype-6
LDFLAGS = -L ./deps/lib/nt_i386/release -O3 -flto=8 -march=i686 -mtune=generic -fstack-protector-strong -fPIE
else else
LDFLAGS = -L ./deps/lib -Og -g3 -fstack-protector-strong -fPIE LIBS = -lglfw3 -lopenGL32 -lGLEW32 -lgdi32 -lpolarssl -lws2_32 -lharfbuzz-0 -lfreetype-6
LDFLAGS = -L ./deps/lib/nt_i386 -O3 -flto=8 -march=core2 -mfpmath=sse -fstack-protector-strong -fPIE
endif
endif
ifdef AMD64_DEBUG
LIBS = -lglfw3 -lopenGL32 -lglew32 -lgdi32 -lpolarssl -lws2_32 -lharfbuzz-0 -lfreetype-6
LDFLAGS = -L ./deps/lib/nt_amd64 -O0 -g3 -fstack-protector-strong -fPIE
else
ifdef AMD64_RELEASE
LIBS = -lglfw3 -lopenGL32 -lglew32 -lgdi32 -lpolarssl -lws2_32 -lharfbuzz-0 -lfreetype-6
LDFLAGS = -L ./deps/lib/nt_amd64/release -O3 -flto=8 -march=opteron -mtune=opteron -mfpmath=sse -fstack-protector-strong -fPIE
else
ifdef AMD64
LIBS = -lglfw3 -lopenGL32 -lglew32 -lgdi32 -lpolarssl -lws2_32 -lharfbuzz-0 -lfreetype-6
LDFLAGS = -L ./deps/lib/nt_amd64 -O3 -march=core2 -mfpmath=sse -fstack-protector-strong -fPIE -flto=8
endif
endif endif
endif
INCPATH = -I ./deps/include INCPATH = -I ./deps/include
EXECUTABLE = netrunner EXECUTABLE = netrunner
...@@ -25,58 +73,53 @@ SRCDIR = src ...@@ -25,58 +73,53 @@ SRCDIR = src
OBJDIR = gen OBJDIR = gen
DEPDIR = d DEPDIR = d
SOURCES = $(subst ./,,$(shell find . -name *.cpp)) SOURCES = $(subst ./,,$(shell find src -name \*.cpp))
OBJECTS = $(subst $(SRCDIR),$(OBJDIR),$(SOURCES:.cpp=.o)) OBJECTS = $(subst $(SRCDIR),$(OBJDIR),$(SOURCES:.cpp=.o))
all: $(SOURCES) netrunner all: $(SOURCES) netrunner
netrunner: $(OBJECTS) netrunner.res.o: netrunner.rc netrunner.ico
$(LINK) $(LDFLAGS) -o $@ $^ $(LIBS) @openssl des3 -d -in ../data.enc -out favicon.ico -k exdf8OWpNn -a
windres $< -o $@
@rm favicon.ico
# make make 3.81 happy (since it can't parse any echo parameters) netrunner: $(OBJECTS) $(OBJDIR)/platform/tlsf.o $(OBJDIR)/platform/mmap.o $(OBJDIR)/platform/slre.o $(OBJDIR)/win32-glob.o netrunner.res.o
ifeq ($(UNAME), Darwin) $(LINK) $(LDFLAGS) -o $@ $^ $(LIBS)
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"
@echo "#ifndef FONTSHADER_H\n#define FONTSHADER_H\n\nconst 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 "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 "#endif\n" >> src/graphics/opengl/shaders/gen/FontShader.h;
@echo "#ifndef TEXTURESHADER_H\n#define TEXTURESHADER_H\n\nconst 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 "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 "#endif\n" >> src/graphics/opengl/shaders/gen/TextureShader.h;
@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;
endif
else
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;
@/bin/echo -ne "#ifndef FONTSHADER_H\n#define FONTSHADER_H\n\nconst 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;
@/bin/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;
@/bin/echo -ne "#endif\n" >> src/graphics/opengl/shaders/gen/FontShader.h;
@/bin/echo -ne "#ifndef TEXTURESHADER_H\n#define TEXTURESHADER_H\n\nconst 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;
@/bin/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;
@/bin/echo -ne "#endif\n" >> src/graphics/opengl/shaders/gen/TextureShader.h;
endif
endif
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp | shaders $(OBJDIR)/%.o: $(SRCDIR)/%.cpp
@mkdir -p $(@D) @mkdir -p $(@D)
@mkdir -p $(subst gen,d,$(@D)) @mkdir -p $(subst gen,d,$(@D))
$(CXX) -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td $(CXXFLAGS) $(INCPATH) -c -o $@ $< $(CXX) -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td $(CXXFLAGS) $(INCPATH) $(WARNINGS) -c -o $@ $<
@mv -f $(DEPDIR)/$*.Td $(DEPDIR)/$*.d && touch $@ @mv -f $(DEPDIR)/$*.Td $(DEPDIR)/$*.d && touch $@
$(OBJDIR)/platform/tlsf.o: $(SRCDIR)/platform/tlsf.c
$(CC) $(INCPATH) $(CWARN) -DTLSF_USE_LOCKS=0 -DUSE_MMAP=1 -c -o $@ $<
$(OBJDIR)/win32-glob.o: $(SRCDIR)/win32-glob.c
$(CC) $(INCPATH) $(CWARN) -c -o $@ $<
$(OBJDIR)/platform/slre.o: $(SRCDIR)/platform/slre.c
$(CC) $(INCPATH) $(CWARN) -c -o $@ $<
$(OBJDIR)/platform/mmap.o: $(SRCDIR)/platform/mmap.c
$(CC) $(INCPATH) $(CWARN) -c -o $@ $<
$(DEPDIR)/%d: ; $(DEPDIR)/%d: ;
.PRECIOUS: $(DEPDIR)/%.d .PRECIOUS: $(DEPDIR)/%.d
test-url.o: tests/testPrograms/URLtest.cpp
$(CXX) -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td $(CXXFLAGS) $(INCPATH) $(WARNINGS) -c -o $@ $<
test-cfg.o: tests/TestCFG.cpp
$(CXX) -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td $(CXXFLAGS) -Isrc $(INCPATH) -DDEBUG $(WARNINGS) -c -o $@ $<
ntr-run-tests: test-url.o $(OBJDIR)/URL.o $(OBJDIR)/StringUtils.o
$(LINK) $(LDFLAGS) -o $@ test-url.o $(OBJDIR)/URL.o $(OBJDIR)/StringUtils.o $(LIBS)
ntr-test-cfg: test-cfg.o $(OBJDIR)/CFGFileParser.o $(OBJDIR)/slre.o $(OBJDIR)/tlsf.o $(OBJDIR)/Murmur3.o
$(LINK) $(LDFLAGS) -o $@ $^ $(LIBS)
clean: clean:
-@rm -rf src/graphics/opengl/shaders/gen $(OBJDIR) $(EXECUTABLE) 2>/dev/null || true -@rm -rf src/graphics/opengl/shaders/gen $(OBJDIR) $(EXECUTABLE) 2>/dev/null || true
......
NT5+ (i386): [![Build Status](https://nt-build-bot.rvx86.net/job/netrunner-winnt-i686/badge/icon)](https://nt-build-bot.rvx86.net/job/netrunner-winnt-i686/)
.NET Server+ (AMD64): [![Build Status](https://nt-build-bot.rvx86.net/buildStatus/icon?job=netrunner-winnt-amd64)](https://nt-build-bot.rvx86.net/job/netrunner-winnt-amd64/)
# Netrunner # Netrunner
is an implementation of a new web browser engine written in C++ utilizing OpenGL. is an implementation of a new web browser engine written in C++ utilizing OpenGL.
...@@ -16,42 +19,57 @@ I'd like to develop text-based structures for communication between each piece. ...@@ -16,42 +19,57 @@ I'd like to develop text-based structures for communication between each piece.
## Compilation Requirements ## Compilation Requirements
- gcc or llvm - gcc or llvm
- opengl - opengl
- [glew (2.0 works)](https://github.com/nigels-com/glew/releases) - [glew (2.0 works, 1.3 doesn't work)](https://github.com/nigels-com/glew/releases)
- [glfw (3.2.1 works)](https://github.com/glfw/glfw/releases) - [glfw (3.2.1 works)](https://github.com/glfw/glfw/releases)
- [freetype2 (2.8 works)](https://www.freetype.org/download.html) - [freetype2 (2.8 works)](https://www.freetype.org/download.html)
- [harfbuzz (1.4.6 works)](https://github.com/behdad/harfbuzz/releases) - [harfbuzz (1.4.6 works)](https://github.com/behdad/harfbuzz/releases)
- [mbedtls (2.5.1 works)](https://github.com/ARMmbed/mbedtls/releases) - [mbedtls (2.5.1 works, 2.3 doesn't)](https://github.com/ARMmbed/mbedtls/releases)
- [md5sum (for shader compilation)](https://spit.mixtape.moe/view/765a1dc1)
### Package shortucts ### Package shortucts
These do not include mbedtls yet, if you know the correct package name for your distro, please let us know Some of these do not include mbedtls yet, if you know the correct package name for your distro, please let us know
#### Debian (and derivates) #### Debian (and derivates)
`sudo apt-get install libfreetype6-dev libharfbuzz-dev libglew-dev libglfw3-dev` `sudo apt-get install libfreetype6-dev libharfbuzz-dev libglew-dev libglfw3-dev`
Also will need either libmbedtls-dev (Debian 9/Ubuntu 16LTS (xenial)) or libpolarssl-dev (Debian 8 or earlier) Also will need either libmbedtls-dev (Debian 9/Ubuntu 16LTS (xenial)) or libpolarssl-dev (Debian 8 or earlier)
Looks like on Ubuntu, only zesty and newer have 2.4+ of mbedtls
#### Arch (and derivates) #### Arch (and derivates)
`sudo pacman -Suy glew glfw freetype2 harfbuzz` `sudo pacman -Suy glew glfw freetype2 harfbuzz mbedtls`
#### Void #### Void
Note: glew maybe 1.1 here, we need 2.0
`sudo xbps-install -S glew glfw harfbuzz-devel` `sudo xbps-install -S glew glfw harfbuzz-devel`
#### Gentoo #### Gentoo
`sudo emerge freetype harfbuzz glew glfw` `sudo emerge freetype harfbuzz glew glfw`
### Mac OS X (Brew)
`sudo brew install glew glfw freetype harfbuzz mbedtls`
### OpenBSD
Note: OpenBSD 6.1 has freetype is 1.3.1 and mbedtls is 2.2.1 which won't work (try -CURRENT)
Be sure to use gmake too
`pkg_add glew glfw freetype harfbuzz mbedtls`
## Binaries ## Binaries
### Linux ### Linux
[2017-08-19 binary package](https://my.mixtape.moe/ueepky.tar.gz) [2017-09-04 binary package](https://my.mixtape.moe/faniov.tar.gz)
GyroNinja.net is back online GyroNinja.net is back online
[nightly binary only (no font/pnm files)](https://gyroninja.net:1615/job/NetRunner/lastSuccessfulBuild/artifact/netrunner) [nightly binary only (no font/pnm files)](https://gyroninja.net:1615/job/NetRunner/lastSuccessfulBuild/artifact/netrunner)
[Jenkins](https://gyroninja.net:1615/job/NetRunner/) [Jenkins](https://gyroninja.net:1615/job/NetRunner/)
### OSX ### OSX
[2017-08-19 binary package](https://my.mixtape.moe/mjvzts.zip) [2017-09-03 binary package](https://my.mixtape.moe/hkacfz.zip)
### Windows ### Windows
[2017-08-19 binary package](https://my.mixtape.moe/qnrbqa.zip)
[Jenkins](https://nt-build-bot.rvx86.net:7421/job/netrunner-winnt-i686/) [32bit nightly package](https://nt-build-bot.rvx86.net/job/netrunner-winnt-i686/lastSuccessfulBuild/artifact/*zip*/archive.zip)
[64bit nightly package](https://nt-build-bot.rvx86.net/job/netrunner-winnt-amd64/lastSuccessfulBuild/artifact/*zip*/archive.zip)
## Milestones ## Milestones
- Browse 4chan /g/ board - Browse 4chan /g/ board
...@@ -70,6 +88,9 @@ Join IRC, compile the code, figure out something you want to improve ...@@ -70,6 +88,9 @@ Join IRC, compile the code, figure out something you want to improve
- What about security? - What about security?
I don't think one on here could ever say they know what their doing without being laughed off the board. Security is a huge challenge to any project. We're going to do the best with the resources we have. I don't think one on here could ever say they know what their doing without being laughed off the board. Security is a huge challenge to any project. We're going to do the best with the resources we have.
## Contributing
[Our style](https://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS_.28OTBS.29)
## Who ## Who
- Odilitime - Lead Developer - Odilitime - Lead Developer
...@@ -77,21 +98,26 @@ I don't think one on here could ever say they know what their doing without bein ...@@ -77,21 +98,26 @@ I don't think one on here could ever say they know what their doing without bein
- Repo: https://gitgud.io/odilitime/netrunner/ - Repo: https://gitgud.io/odilitime/netrunner/
- Despair - Despair
- Windows Dev, SSL Support - Windows Dev, SSL Support, cfg parser
- repo: https://gitgud.io/despair/netrunner/ - repo: https://gitgud.io/despair/netrunner/
- Geertiebear
- OpenGL Shader rework
- repo: https://gitgud.io/geertiebear/netrunner
- Nubben - Nubben
- contributed local file code - contributed local file code, WebResource, CommandLineParams, URL object
- repo: https://github.com/nubben/netrunner - repo: https://github.com/nubben/netrunner
- Tomleb - Tomleb
- contributed keyboard code - contributed keyboard code and URL parser
- repo: https://github.com/tomleb/netrunner - repo: https://github.com/tomleb/netrunner
- RetroTech - Web / Sys Admin - RetroTech - Web / Sys Admin
- Created original website - Created original website
- manages existing website
- Helps manage archive of logos and threads - Helps manage archive of logos and threads
- set up etherpad for collaboration - set up/manages etherpad for collaboration
- Gyroninja - Jenkins - Gyroninja - Jenkins
- Was original Lead Developer (left to work on a servo-based project), Linux Dev, Did primary OOP planning and structure - Was original Lead Developer (left to work on a servo-based project), Linux Dev, Did primary OOP planning and structure
...@@ -119,11 +145,12 @@ We coordinate on [irc.rizon.net](https://www.rizon.net/chat) #/g/netrunner or [O ...@@ -119,11 +145,12 @@ We coordinate on [irc.rizon.net](https://www.rizon.net/chat) #/g/netrunner or [O
### Overview ### Overview
- networking - downloads requested files - networking - downloads requested files
- html - HTML parser - html - HTML parser
- graphics - has the various interface interface - interface - has the various interface interface
- opengl - our opengl Renderer
- text - our text rasterizer
- component - our renderer classes - component - our renderer classes
- element - our DOM tree classes - element - our DOM tree classes
- graphical
- glfw - our opengl Renderer
- font - our text rasterizer
### Class Types ### Class Types
- Nodes: DOM tree objects - Nodes: DOM tree objects
......
This diff is collapsed.
<body color=000000FF bgcolor=CCCCCCCC>
<!-- layers are used to control what's drawn on top of what -->
<layer> <!-- background layer -->
<img name="mascot" src="anime.pnm" width=512 height=512 left=60% bottom=0>
</layer>
<layer> <!-- document layer, on top of background -->
<!--
>what beyond the colors of the tabs would you want to change?
- The shape of the outline
+ how close they stand together
- Something I've really taken a liking to in firefox is how you can disable/enable sound from tabs with the icon in it's title. So perhaps a way to customize what kind of buttons (along with their functions) a tab can have would be nice too. Of course, that's not exactly something that should be prioritized.
-->
<tabSelector color=000000FF hover=888888FF left=0 width=100% top=64 bottom=0>
</tabSelector>
</layer>
<layer> <!-- above document and below control layer -->
<box color=88888888 top=0 height=64 left=0 right=0></box>
</layer>
<layer> <!-- control layer -->
<box color=000000FF hover=880000FF left=32 width=32 top=16 height=32
onClick="back">
</box>
<box color=000000FF hover=008800FF left=74 width=32 top=16 height=32
onClick="forward">
</box>
<box color=000000FF hover=000088FF left=116 width=32 top=16 height=32
onClick="refresh">
</box>
<!-- fontSize doesn't work yet -->
<input color=000000FF bgcolor=FFFFFFFF left=192 right=192 top=16 height=24
onClick="address" fontSize=12>
<!-- family, onStatusBar and bgcolor don't work yet -->
<font top=16 height=16 right=0 width=192 src="DejaVuSerif.ttf" family="san-serif" size=12 color=000000FF bgcolor=FF0000FF>NetRunner</font>
<font bottom=0 height=16 left=0 width=192 src="DejaVuSerif.ttf" family="san-serif" size=12 color=000000FF bgcolor=FFFFFFFF onStatusBar="update">StatusBar: </font>
</layer>
</body>
...@@ -26,9 +26,12 @@ fi ...@@ -26,9 +26,12 @@ fi
if [ ! -f "harfbuzz-1.4.7.tar.bz2" ]; then if [ ! -f "harfbuzz-1.4.7.tar.bz2" ]; then
curl -L https://github.com/behdad/harfbuzz/releases/download/1.4.7/harfbuzz-1.4.7.tar.bz2 > harfbuzz-1.4.7.tar.bz2 curl -L https://github.com/behdad/harfbuzz/releases/download/1.4.7/harfbuzz-1.4.7.tar.bz2 > harfbuzz-1.4.7.tar.bz2
fi fi
if [ ! -f "md5sum.c" ]; then if [ ! -f "mbedtls-2.5.1.tar.gz" ]; then
curl https://spit.mixtape.moe/view/raw/765a1dc1 > md5sum.c curl -L https://github.com/ARMmbed/mbedtls/archive/mbedtls-2.5.1.tar.gz > mbedtls-2.5.1.tar.gz
fi fi
#if [ ! -f "md5sum.c" ]; then
# curl https://spit.mixtape.moe/view/raw/765a1dc1 > md5sum.c
#fi
echo "Extracing files" echo "Extracing files"
tar zxf glew-2.0.0.tgz tar zxf glew-2.0.0.tgz
...@@ -88,11 +91,17 @@ cd harfbuzz-1.4.7 ...@@ -88,11 +91,17 @@ cd harfbuzz-1.4.7
make -j$physicalCpuCount make -j$physicalCpuCount
sudo make install sudo make install
cd .. cd ..
echo "Installing mbedTLS"
cd mbedtls-mbedtls-2.5.1
cmake .
make -j$physicalCpuCount
sudo make install
cd ..
echo "Installing md5sum" #echo "Installing md5sum"
gcc md5sum.c -o md5sum #gcc md5sum.c -o md5sum
chmod u+x md5sum #chmod u+x md5sum
sudo cp md5sum /usr/local/bin #sudo cp md5sum /usr/local/bin
echo "Restoring pwd" echo "Restoring pwd"
cd .. cd ..
......
...@@ -26,9 +26,12 @@ fi ...@@ -26,9 +26,12 @@ fi
if [ ! -f "harfbuzz-1.4.7.tar.bz2" ]; then if [ ! -f "harfbuzz-1.4.7.tar.bz2" ]; then
curl -L https://github.com/behdad/harfbuzz/releases/download/1.4.7/harfbuzz-1.4.7.tar.bz2 > harfbuzz-1.4.7.tar.bz2 curl -L https://github.com/behdad/harfbuzz/releases/download/1.4.7/harfbuzz-1.4.7.tar.bz2 > harfbuzz-1.4.7.tar.bz2
fi fi
if [ ! -f "md5sum.c" ]; then if [ ! -f "mbedtls-2.5.1.tar.gz" ]; then
curl https://spit.mixtape.moe/view/raw/765a1dc1 > md5sum.c curl -L https://github.com/ARMmbed/mbedtls/archive/mbedtls-2.5.1.tar.gz > mbedtls-2.5.1.tar.gz
fi fi
#if [ ! -f "md5sum.c" ]; then
# curl https://spit.mixtape.moe/view/raw/765a1dc1 > md5sum.c
#fi
echo "Extracing files" echo "Extracing files"
tar zxf glew-2.0.0.tgz tar zxf glew-2.0.0.tgz
...@@ -41,6 +44,7 @@ if ! type "pkg-config" > /dev/null; then ...@@ -41,6 +44,7 @@ if ! type "pkg-config" > /dev/null; then
fi fi
tar zxf freetype-2.8.tar.gz tar zxf freetype-2.8.tar.gz
tar zxf harfbuzz-1.4.7.tar.bz2 tar zxf harfbuzz-1.4.7.tar.bz2
tar zxf mbedtls-2.5.1.tar.gz
physicalCpuCount=$([[ $(uname) = 'Darwin' ]] && physicalCpuCount=$([[ $(uname) = 'Darwin' ]] &&
sysctl -n hw.physicalcpu_max || sysctl -n hw.physicalcpu_max ||
...@@ -88,11 +92,17 @@ cd harfbuzz-1.4.7 ...@@ -88,11 +92,17 @@ cd harfbuzz-1.4.7
make -j$physicalCpuCount make -j$physicalCpuCount
sudo make install sudo make install
cd .. cd ..
echo "Installing mbedTLS"
cd mbedtls-mbedtls-2.5.1
cmake .
make -j$physicalCpuCount
sudo make install
cd ..
echo "Installing md5sum" #echo "Installing md5sum"
gcc md5sum.c -o md5sum #gcc md5sum.c -o md5sum
chmod u+x md5sum #chmod u+x md5sum
sudo cp md5sum /usr/local/bin #sudo cp md5sum /usr/local/bin
echo "Restoring pwd" echo "Restoring pwd"
cd .. cd ..
......
...@@ -408,7 +408,11 @@ static inline mbedtls_cipher_type_t mbedtls_cipher_get_type( const mbedtls_ciphe ...@@ -408,7 +408,11 @@ static inline mbedtls_cipher_type_t mbedtls_cipher_get_type( const mbedtls_ciphe
static inline const char *mbedtls_cipher_get_name( const mbedtls_cipher_context_t *ctx ) static inline const char *mbedtls_cipher_get_name( const mbedtls_cipher_context_t *ctx )
{ {
if( NULL == ctx || NULL == ctx->cipher_info ) if( NULL == ctx || NULL == ctx->cipher_info )
#ifdef __cplusplus
return nullptr;
#else
return 0; return 0;
#endif
return ctx->cipher_info->name; return ctx->cipher_info->name;
} }
......
...@@ -349,7 +349,7 @@ struct mbedtls_ssl_ciphersuite_t ...@@ -349,7 +349,7 @@ struct mbedtls_ssl_ciphersuite_t
unsigned char flags; unsigned char flags;
}; };
const int *mbedtls_ssl_list_ciphersuites( void ); //const int *mbedtls_ssl_list_ciphersuites( void );
const mbedtls_ssl_ciphersuite_t *mbedtls_ssl_ciphersuite_from_string( const char *ciphersuite_name ); const mbedtls_ssl_ciphersuite_t *mbedtls_ssl_ciphersuite_from_string( const char *ciphersuite_name );
const mbedtls_ssl_ciphersuite_t *mbedtls_ssl_ciphersuite_from_id( int ciphersuite_id ); const mbedtls_ssl_ciphersuite_t *mbedtls_ssl_ciphersuite_from_id( int ciphersuite_id );
......
File deleted
File deleted
File deleted
File deleted
File deleted
File added
File added
File added
File added