2024-06-21 17:52:16 +02:00
|
|
|
.PHONY: all clean run
|
|
|
|
VERSION = 0.0.1
|
|
|
|
|
2024-06-24 23:56:39 +02:00
|
|
|
PREFIX=/usr/local
|
|
|
|
|
2024-06-21 17:52:16 +02:00
|
|
|
LIBS = sdl2 glew
|
|
|
|
CMACRO = -DVERSION=\"$(VERSION)\"
|
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
CFLAGS = -g -Wall -Wextra -pedantic $(shell pkg-config $(LIBS) --cflags) $(CMACRO)
|
|
|
|
LDFLAGS = $(shell pkg-config $(LIBS) --libs) -lm
|
|
|
|
|
|
|
|
all: zoomer
|
|
|
|
|
|
|
|
zoomer: zoomer.o
|
|
|
|
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o
|
|
|
|
rm -f zoomer
|
|
|
|
|
2024-06-24 23:56:39 +02:00
|
|
|
install: zoomer
|
|
|
|
install -Dm755 $< $(DESTDIR)$(PREFIX)/bin/$<
|
|
|
|
|
2024-06-21 17:52:16 +02:00
|
|
|
bear: clean
|
|
|
|
bear -- make
|
|
|
|
|
|
|
|
run: zoomer
|
|
|
|
./$<
|