Browse Source

Fixed DJMakefile, preparing for interface breakout

rick 1 year ago
parent
commit
d033bd83f5
2 changed files with 9 additions and 8 deletions
  1. 8
    8
      DJMakefile
  2. 1
    0
      version.git

+ 8
- 8
DJMakefile View File

@@ -2,15 +2,15 @@ UNAME := $(shell uname)
2 2
 CXX         = gpp
3 3
 CC          = gcc
4 4
 
5
-GIT_VERSION := $(shell git describe --abbrev=4 --always --tags)
6
-PLATFORM := $(shell gpp -dumpmachine)
5
+GIT_VERSION := $(shell cat version.git)
6
+PLATFORM := $(MACHTYPE)
7 7
 
8
-CXXFLAGS   = -O3 -march=i486 -flto=8 -DVERSION=\"$(GIT_VERSION)\" -DPLATFORM=\"$(PLATFORM)\"
9
-CFLAGS     = -O3 -flto=8 -march=i486 -std=c11 -DVERSION=\"$(GIT_VERSION)\"
8
+CXXFLAGS   = -O3 -march=i486 -flto=8 -DVERSION=\"$(GIT_VERSION)\" -DPLATFORM=\"$(PLATFORM)\" -fpermissive -fstack-protector-strong
9
+CFLAGS     = -O3 -flto=8 -march=i486 -std=c11 -DVERSION=\"$(GIT_VERSION)\" -fstack-protector-strong
10 10
 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
11 11
 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
12
-LIBS       = -lglfw -lGL -lGLEW -lfreetype -lharfbuzz -lpolarssl
13
-LDFLAGS    = -O3 -flto=8
12
+LIBS       = -lglfw -lGL -lGLEW -lharfbuzz -lpolarssl -lwatt -lnx11 -lnano-x -lfreetype2 -lpthread -Ld:/djgpp/lib
13
+LDFLAGS    = -O3 -flto=8 -march=i486 -fstack-protector-strong
14 14
 INCPATH    = -Ideps/include
15 15
 MD5SUM     = md5sum
16 16
 
@@ -27,13 +27,13 @@ OBJECTS = $(subst $(SRCDIR),$(OBJDIR),$(SOURCES:.cpp=.o))
27 27
 all: $(SOURCES) netrunner
28 28
 
29 29
 netrunner: $(OBJECTS) $(OBJDIR)/tlsf.o
30
-	$(LINK) $(LDFLAGS) -o $@ $^ $(LIBS)
30
+	$(LINK) $(LDFLAGS) -o $@ $^ stub.o $(LIBS)
31 31
 
32 32
 $(OBJDIR)/%.o: $(SRCDIR)/%.cpp
33 33
 	@mkdir -p $(@D)
34 34
 	@mkdir -p $(subst gen,d,$(@D))
35 35
 	$(CXX) -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td $(CXXFLAGS) $(INCPATH) $(WARNINGS) -c -o $@ $<
36
-	@move $(DEPDIR)\$*.Td $(DEPDIR)\$*.d 
36
+	@mv $(DEPDIR)/$*.Td $(DEPDIR)/$*.d 
37 37
 	touch $@
38 38
 
39 39
 $(OBJDIR)/tlsf.o: $(SRCDIR)/tlsf.c

+ 1
- 0
version.git View File

@@ -0,0 +1 @@
1
+20ba