2016-04-29 15:07:08 +03:00
|
|
|
# Install
|
|
|
|
BIN = demo
|
|
|
|
|
|
|
|
# Flags
|
2022-03-14 22:46:44 +03:00
|
|
|
CFLAGS += -std=c99 -Wall -Wextra -pedantic -O2
|
2016-04-29 15:07:08 +03:00
|
|
|
|
|
|
|
SRC = main.c
|
|
|
|
OBJ = $(SRC:.c=.o)
|
|
|
|
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
BIN := $(BIN).exe
|
|
|
|
LIBS = -lglfw3 -lopengl32 -lm -lGLU32
|
|
|
|
else
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
ifeq ($(UNAME_S),Darwin)
|
2017-01-14 11:40:23 +03:00
|
|
|
LIBS := -lglfw3 -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo -lm -lGLEW -L/usr/local/lib
|
2016-04-29 15:07:08 +03:00
|
|
|
else
|
2016-07-06 04:15:00 +03:00
|
|
|
LIBS = -lglfw -lGL -lm -lGLU
|
2016-04-29 15:07:08 +03:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(BIN):
|
|
|
|
@mkdir -p bin
|
|
|
|
rm -f bin/$(BIN) $(OBJS)
|
|
|
|
$(CC) $(SRC) $(CFLAGS) -o bin/$(BIN) $(LIBS)
|