2016-04-30 15:50:54 +03:00
|
|
|
# Install
|
|
|
|
BIN = demo
|
|
|
|
|
|
|
|
# Compiler
|
|
|
|
CC = clang
|
|
|
|
DCC = gcc
|
|
|
|
|
|
|
|
# Flags
|
2021-12-16 22:44:00 +03:00
|
|
|
CFLAGS += -std=c89 -Wall -Wextra -pedantic -O2
|
2016-04-30 15:50:54 +03:00
|
|
|
|
|
|
|
SRC = main.c
|
|
|
|
OBJ = $(SRC:.c=.o)
|
|
|
|
|
|
|
|
# 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) -lX11 -lm -lGL -lm -lGLU
|