diff options
author | SanJacobs | 2022-08-28 13:15:23 +0200 |
---|---|---|
committer | SanJacobs | 2022-08-28 13:15:23 +0200 |
commit | 1775a5452f397b7d61e116ed21b14b5ca2dae167 (patch) | |
tree | be9c71d1b398519443f263063a45e96b15538188 /makefile | |
parent | 881ed621f9eca0ef8303cb3818eee1fd954141c1 (diff) | |
download | satscalc-1775a5452f397b7d61e116ed21b14b5ca2dae167.tar.gz satscalc-1775a5452f397b7d61e116ed21b14b5ca2dae167.tar.bz2 satscalc-1775a5452f397b7d61e116ed21b14b5ca2dae167.zip |
Added comfy release buildingv0.2.0-alpha
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 33 |
1 files changed, 24 insertions, 9 deletions
@@ -8,7 +8,13 @@ CXX = g++ # Enabling C++17 mode so I can have more <algorithm> stuff CVERSION=-std=c++17 -CFLAGS= +# 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/ @@ -25,26 +31,35 @@ 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) $(CFLAGS) $(LIBS) $(OBJECTS) -o satscalc + $(CXX) $(LIBDIR) $(CVERSION) $(LIBS) $(OBJECTS) -o $(NAME) $(OBJECTS): obj/%.o : src/%.cpp mkdir -p $(OBJDIR) - $(CXX) -g $(INCLUDE) $(CVERSION) $(CFLAGS) -c $< -o $@ + $(CXX) $(CFLAGS) $(INCLUDE) $(CVERSION) $(CFLAGS) -c $< -o $@ windows: - zig c++ -target x86_64-windows-gnu src/*.cpp $(CVERSION) -g -gcodeview -o satscalc.exe + zig c++ -target x86_64-windows-gnu src/*.cpp $(CVERSION) $(WINFLAGS) -o $(NAME).exe windows32: - zig c++ -target i386-windows-gnu src/*.cpp $(CVERSION) -g -gcodeview -o satscalc32.exe + zig c++ -target i386-windows-gnu src/*.cpp $(CVERSION) $(WINFLAGS) -o $(NAME).exe mac: - zig c++ -target x86_64-macos-gnu src/*.cpp $(CVERSION) -g -gcodeview -o satscalc - + zig c++ -target x86_64-macos-gnu src/*.cpp $(CVERSION) $(CFLAGS) -o $(NAME) + +release: + mkdir -p bin/linux + make CFLAGS=-O2 NAME=bin/linux/$(NAME)-$(V) + mkdir -p bin/mac + make mac CFLAGS=-O2 NAME=bin/mac/$(NAME)-$(V) + mkdir -p bin/windows + make windows WINFLAGS="-O2 --static" NAME=bin/windows/$(NAME)-$(V) + make windows32 WINFLAGS="-O2 --static" NAME=bin/windows/$(NAME)-$(V)-win32 + clean: - rm obj/*.o + rm -f obj/*.o cleanall: - rm obj/*.o a.out + rm -rf obj/*.o bin/ $(NAME) install: a.out cp satscalc /usr/local/bin/satscalc |