27 lines
365 B
Makefile
27 lines
365 B
Makefile
# Install
|
|
BIN = zahnrad
|
|
|
|
# Compiler
|
|
CC = clang
|
|
DCC = gcc
|
|
|
|
# Flags
|
|
CFLAGS = -std=c89 -pedantic -O2
|
|
|
|
SRC = xlib.c ../../zahnrad.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) -D_POSIX_C_SOURCE=200809L -o bin/$(BIN) -lX11 -lm
|