27 lines
361 B
Makefile
27 lines
361 B
Makefile
# Install
|
|
BIN = zahnrad
|
|
|
|
# Compiler
|
|
CC = clang
|
|
DCC = gcc
|
|
|
|
# Flags
|
|
CFLAGS = -std=c89 -pedantic
|
|
|
|
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
|