aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile38
1 files changed, 33 insertions, 5 deletions
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 \