first commit
This commit is contained in:
28
Makefile
Normal file
28
Makefile
Normal file
@ -0,0 +1,28 @@
|
||||
.PHONY: all clean run
|
||||
VERSION = 0.0.1
|
||||
|
||||
LIBS = sdl2
|
||||
CMACRO = -DVERSION=\"$(VERSION)\"
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -g -Wall -Wextra -pedantic $(shell pkg-config $(LIBS) --cflags) $(CMACRO)
|
||||
LDFLAGS = $(shell pkg-config $(LIBS) --libs) -lm
|
||||
|
||||
all: pong
|
||||
|
||||
pong: pong.o
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f pong
|
||||
|
||||
bear: clean
|
||||
bear -- make
|
||||
|
||||
run: pong
|
||||
./$<
|
||||
|
Reference in New Issue
Block a user