build with GL3W
This commit is contained in:
1 parent
524b44cbcd
commit
8c02c0636e
2 files changed
+34
-28
No files matched your search
@@ -1,22 +1,32 @@
|
||||
FILE := app
|
||||
TARGET := $(FILE)
|
||||
TARGET := app
|
||||
OBJS := app.o GL3/gl3w.o
|
||||
REPOS := glcxx glm
|
||||
|
||||
CCFLAGS := $(shell sdl2-config --cflags)
|
||||
ifeq (MINGW,$(findstring MINGW,$(shell uname)))
|
||||
LIBS := -lopengl32 -lglu32 -lmingw32
|
||||
LIBS := -lopengl32 -lmingw32
|
||||
CXX := mingw32-g++
|
||||
TARGET := $(TARGET).exe
|
||||
else
|
||||
LIBS := -lGL -lGLU `sdl2-config --libs`
|
||||
LIBS := -lGL `sdl2-config --libs`
|
||||
endif
|
||||
LIBS += -ldl
|
||||
LDFLAGS := $(LIBS) $(shell sdl2-config --libs)
|
||||
CCFLAGS += -I glcxx/include -I glm -I.
|
||||
CXXFLAGS += -std=gnu++14
|
||||
CCFLAGS += -DGLCXX_GL_INCLUDE='"GL3/gl3w.h"'
|
||||
|
||||
|
||||
all: submodule_init $(TARGET)
|
||||
|
||||
$(TARGET): $(FILE).cc
|
||||
$(CXX) -o $(TARGET) $(CCFLAGS) $< $(LDFLAGS)
|
||||
$(TARGET): $(OBJS)
|
||||
$(CXX) -o $(TARGET) $^ $(LDFLAGS)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -c -o $@ $(CCFLAGS) $(CFLAGS) $<
|
||||
|
||||
%.o: %.cc
|
||||
$(CXX) -c -o $@ $(CCFLAGS) $(CXXFLAGS) $<
|
||||
|
||||
.PHONY: submodule_init
|
||||
submodule_init:
|
||||
|
||||
Reference in new issue
Block a user