initial commit
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ie3b66d17f6f660c9b9a719210bd86f9f6a6a6964
This commit is contained in:
commit
b381e2efbd
29 changed files with 1633 additions and 0 deletions
31
Makefile
Normal file
31
Makefile
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Makefile for Roguelike Game
|
||||
# Requires raylib, pkg-config
|
||||
|
||||
CC := cc
|
||||
CFLAGS := -Wall -Wextra -O2 -std=c99 -Isrc
|
||||
LDFLAGS := -lraylib -lm -lpthread -ldl -lrt
|
||||
|
||||
TARGET := roguelike
|
||||
SRCDIR := src
|
||||
OBJDIR := obj
|
||||
|
||||
SOURCES := $(wildcard $(SRCDIR)/*.c)
|
||||
OBJECTS := $(patsubst $(SRCDIR)/%.c,$(OBJDIR)/%.o,$(SOURCES))
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(CC) $^ -o $@ $(LDFLAGS)
|
||||
|
||||
$(OBJDIR)/%.o: $(SRCDIR)/%.c
|
||||
@mkdir -p $(dir $@)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR) $(TARGET)
|
||||
|
||||
# Alias for development
|
||||
dev: all
|
||||
./$(TARGET)
|
||||
Loading…
Add table
Add a link
Reference in a new issue