ClassiCube/src/Makefile

18 lines
431 B
Makefile
Raw Normal View History

2018-10-14 02:31:13 -04:00
CC=gcc
2019-03-11 07:17:02 -04:00
LIBS=-lX11 -lpthread -lGL -lm -lcurl -lopenal -ldl
CFLAGS=-g -w -no-pie -rdynamic -pipe
2018-10-14 02:31:13 -04:00
SOURCES=$(wildcard *.c)
OBJECTS=$(patsubst %.c, %.o, $(SOURCES))
2019-03-11 07:17:02 -04:00
COMMITSHA=$(shell git rev-parse --short HEAD)
2018-10-14 02:31:13 -04:00
EXECUTABLE=ClassiCube
$(EXECUTABLE): $(OBJECTS)
$(CC) $(CFLAGS) -o $@ $(OBJECTS) $(LIBS)
$(OBJECTS): %.o : %.c
2018-10-25 14:39:34 -04:00
$(CC) $(CFLAGS) -DCC_COMMIT_SHA=\"$(COMMITSHA)\" -c $< $(LIBS) -o $@
2018-10-14 02:31:13 -04:00
clean:
2018-10-14 02:54:17 -04:00
rm -f $(EXECUTABLE) $(OBJECTS)