Files

34 lines
702 B
Makefile

# Name der Ausgabedatei
TARGET = spiel.exe
# Quelldateien
SRC = main.c
# Compiler
CC = gcc
# Compiler-Flags
# -Iinclude: Sagt dem Compiler, dass er im Ordner 'include' nach raylib.h suchen soll
CFLAGS = -Wall -std=c99 -Iinclude
# Pfad zu den Bibliotheken (-Llib verweist auf den lokalen 'lib' Ordner)
LDFLAGS = -Llib
# Linker-Bibliotheken
# -lraylib bindet die lokale libraylib.a ein
# Die restlichen sind Windows-Systembibliotheken
LIBS = -lraylib -lopengl32 -lgdi32 -lwinmm
# Standard-Ziel zum Kompilieren
all: $(TARGET)
$(TARGET): $(SRC)
$(CC) $(CFLAGS) $(SRC) -o $(TARGET) $(LDFLAGS) $(LIBS)
# Programm ausführen
run: all
$(TARGET)
# Aufräumen (Windows-Befehl)
clean:
del /q $(TARGET)