Nuklear/demo/allegro5_simple/Makefile

34 lines
557 B
Makefile
Raw Normal View History

2015-12-30 18:31:08 +03:00
# Install
BIN = demo
# Compiler
CC = clang
DCC = gcc
# Flags
CFLAGS = -std=c89 -pedantic
SRC = ../../zahnrad.c allegro.c
OBJ = $(SRC:.c=.o)
ifeq ($(OS),Windows_NT)
BIN := $(BIN).exe
2015-12-31 16:39:29 +03:00
LIBS = -lmingw32 -lallegro -lallegro_primitives -lallegro_font -lallegro_ttf -lm
2015-12-30 18:31:08 +03:00
else
2015-12-31 16:39:29 +03:00
LIBS = -lallegro -lallegro_primitives -lallegro_font -lallegro_ttf -lGL -lm -lGLU -lGLEW
2015-12-30 18:31:08 +03:00
endif
# Modes
.PHONY: gcc
gcc: CC = gcc
gcc: $(BIN)
.PHONY: clang
clang: CC = clang
clang: $(BIN)
$(BIN):
@mkdir -p bin
rm -f bin/$(BIN) $(OBJS)
$(CC) $(SRC) $(CFLAGS) -o bin/$(BIN) $(LIBS)