From 0774bfb25fee5fbbbabb93a8d385b01aa6f9efba Mon Sep 17 00:00:00 2001 From: quou Date: Thu, 26 Sep 2024 22:01:44 +1000 Subject: release makefile config --- Makefile | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index bc07003..24a80cd 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,16 @@ +ifndef config + config=debug_gnu64 +endif + +.PHONY: all clean + compiler = gcc tool_compiler = gcc linker = gcc -cflags = -I./ -g -DDEBUG -Dplat_x11 -Dplat_x86 \ --Dplat_posix -Dallocation_default_alignment=8 \ --Dplat_pulse \ --Wall -Wextra -pedantic -std=c90 -lflags = -lX11 -lXi -lpulse -lpulse-simple -lpthread -lm +includes = -I./ +cflags = $(includes) $(conf_cflags) \ + -Wall -Wextra -pedantic -std=c90 +lflags = $(libs) $(conf_lflags) target = 1bitjam int_dir = intermediate data_dir = data @@ -13,6 +18,29 @@ convimg = convimg packassets = packassets pack = pack.h +ifeq ($(config), debug_gnu64) + compiler = gcc + tool_compiler = gcc + linker = gcc + conf_cflags = -DDEBUG -Dplat_x11 -Dplat_x86 \ + -Dplat_posix -Dallocation_default_alignment=8 \ + -Dplat_pulse \ + -g + libs = -lX11 -lXi -lpulse -lpulse-simple -lpthread -lm +endif + +ifeq ($(config), release_gnu64) + compiler = gcc + tool_compiler = gcc + linker = gcc + conf_cflags = -DNDEBUG -Dplat_x11 -Dplat_x86 \ + -Dplat_posix -Dallocation_default_alignment=8 \ + -Dplat_pulse \ + -s -O3 -m64 + conf_lflags = -m64 -s + libs = -lX11 -lXi -lpulse -lpulse-simple -lpthread -lm +endif + sources = \ 1bitjam.c \ asset.c \ -- cgit v1.2.3-54-g00ecf