aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorSanJacobs2023-05-18 00:42:06 +0200
committerSanJacobs2023-05-18 00:42:06 +0200
commitd2b654b37da8fd7dcc29f01c4d654b008ff724f7 (patch)
treeec0464fdaeb23b60690c3384be3fe98123843732 /makefile
parent84cfd69cb5e3fe712f73ea51f3edf3b347918447 (diff)
downloadsatscalc-d2b654b37da8fd7dcc29f01c4d654b008ff724f7.tar.gz
satscalc-d2b654b37da8fd7dcc29f01c4d654b008ff724f7.tar.bz2
satscalc-d2b654b37da8fd7dcc29f01c4d654b008ff724f7.zip
Comfy building on Linux
Diffstat (limited to 'makefile')
-rw-r--r--makefile70
1 files changed, 2 insertions, 68 deletions
diff --git a/makefile b/makefile
index 5c9912f..f9f3042 100644
--- a/makefile
+++ b/makefile
@@ -1,68 +1,2 @@
-# INCLUDE is where you find the header files for the libs you're using. They are used during compilation.
-# Example: -I /usr/include/boost/
-INCLUDE=
-
-# Compiler. Pretty self-explanatory.
-CXX = g++
-
-# Enabling C++17 mode so I can have more <algorithm> stuff
-CVERSION=-std=c++17
-
-# Native compilation flags and crosscompilation flags for Windows
-CFLAGS=-g
-WINFLAGS=-g -gcodeview
-
-# Executable name stuff
-V=v0.2.0-alpha
-NAME=satscalc
-
-# LIBDIR is where you can find the linkable objects or whatever. They are used for the linking stage.
-# -L /usr/lib/x86_64-linux-gnu/
-LIBDIR=
-
-# LIBS are the libs you are using written with a -l and then ignoring the lib-part at the beginning of the file's name.
-# So "libboost_date_time.a" will be just "-lboost_date_time"
-LIBS=
-
-# Sources are the source code files. Only the .cpp files, becuase the .h files are included into them during pre-processing.
-SOURCES=$(wildcard src/*.cpp)
-OBJDIR=obj/
-OBJECTS=$(patsubst src/%.cpp, $(OBJDIR)%.o, $(SOURCES))
-# This last line creates an identical list of objects based on the list of .cpp files.
-
-a.out: $(OBJECTS)
- $(CXX) $(LIBDIR) $(CVERSION) $(LIBS) $(OBJECTS) -o $(NAME)
-
-$(OBJECTS): obj/%.o : src/%.cpp
- mkdir -p $(OBJDIR)
- $(CXX) $(CFLAGS) $(INCLUDE) $(CVERSION) $(CFLAGS) -c $< -o $@
-
-windows:
- zig c++ -target x86_64-windows-gnu src/*.cpp $(CVERSION) $(WINFLAGS) -o $(NAME).exe
-
-windows32:
- zig c++ -target i386-windows-gnu src/*.cpp $(CVERSION) $(WINFLAGS) -o $(NAME).exe
-
-mac:
- zig c++ -target x86_64-macos-gnu src/*.cpp $(CVERSION) $(CFLAGS) -o $(NAME)
-
-release:
- mkdir -p bin
- make CFLAGS=-O2 NAME=bin/$(NAME)-$(V)-linux
- make mac CFLAGS=-O2 NAME=bin/$(NAME)-$(V)-macOS
- make windows WINFLAGS="-O2 --static" NAME=bin/$(NAME)-$(V)-win64
- make windows32 WINFLAGS="-O2 --static" NAME=bin/$(NAME)-$(V)-win32
- chmod +x bin/*
-
-clean:
- rm -f obj/*.o
-
-cleanall:
- rm -rf obj/*.o bin/ $(NAME)
-
-install: a.out
- cp satscalc /usr/local/bin/satscalc
-
-test: a.out
- ./test.sh
-
+main:
+ odin run src/ -out:main.out