aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-05-10 16:48:37 +0200
committerCharles <sircharlesaze@gmail.com>2020-05-10 16:48:37 +0200
commitf23764a0ec0b946d9d0c0dd1a2537c0d22849086 (patch)
tree81d0b4dc68e4f34d6e950d0f28f58ca5d3d1e07f /Makefile
parent6d9c284a24555a7df0b37661ff3c5491d6d0449a (diff)
downloadcardioid-f23764a0ec0b946d9d0c0dd1a2537c0d22849086.tar.gz
cardioid-f23764a0ec0b946d9d0c0dd1a2537c0d22849086.tar.bz2
cardioid-f23764a0ec0b946d9d0c0dd1a2537c0d22849086.zip
Dynamic factor, everything to double, removed cardioid struct, window resize
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 7 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 44c7a9c..dabbf60 100644
--- a/Makefile
+++ b/Makefile
@@ -3,27 +3,23 @@ MKDIR = mkdir -p
NAME = cardioid
-SRCDIR = src
-INCDIR = inc
-OBJDIR = obj
-
CC = gcc
CCFLAGS = -Wall -Wextra -I$(INCDIR) $(shell sdl2-config --cflags)
LDFLAGS = $(shell sdl2-config --libs) -lm
-SRC = $(shell find $(SRCDIR) -type f -name "*.c")
-INC = $(shell find $(INCDIR) -type f -name "*.h")
-OBJ = $(SRC:$(SRCDIR)/%.c=$(OBJDIR)/%.o)
+SRC = $(shell find . -type f -name "*.c")
+INC = $(shell find . -type f -name "*.h")
+OBJ = $(SRC:.c=.o)
-all: prebuild $(NAME)
+all: $(NAME)
-prebuild:
- $(MKDIR) $(OBJDIR)
+release: CCFLAGS += -D CARDIOID_RELEASE -Ofast
+release: re
$(NAME): $(OBJ)
$(CC) -o $@ $^ $(LDFLAGS)
-$(OBJDIR)/%.o: $(SRCDIR)/%.c $(INC)
+%.o: %.c $(INC)
$(CC) $(CCFLAGS) -c -o $@ $<
clean: