-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
37 lines (31 loc) · 878 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
BUILDDIR=$(ROOTDIR)/_build
ifeq ($(WIN32),1)
INCLUDE=$(ROOTDIR)/include
LIBRARY=$(ROOTDIR)/lib-mingw-w64
ADDITIONAL_OPTS=-cclib -lgdi32
else
INCLUDE=$(BUILDDIR)/glfw/include
LIBRARY=$(BUILDDIR)/glfw/src
endif
# Building glfw from source
$(INCLUDE)/GLFW/glfw3.h:
echo Library: $(LIBRARY)
echo Include: $(INCLUDE)
mkdir -p $(BUILDDIR)
git clone https://github.com/glfw/glfw $(BUILDDIR)/glfw
$(LIBRARY)/libglfw3.a: $(INCLUDE)/GLFW/glfw3.h
cd $(BUILDDIR)/glfw; cmake .
cd $(BUILDDIR)/glfw; make
build-glfw: $(LIBRARY)/libglfw3.a
echo Library: $(LIBRARY)
echo Include: $(INCLUDE)
mkdir -p $(BUILDDIR)
install:
@echo Installing from $(LIBRARY) to $(LIBDIR)
@mkdir -p $(LIBDIR)
@cp $(LIBRARY)/*.a $(LIBDIR)
@echo Installing from $(INCLUDE) to $(INCLUDEDIR)
@mkdir -p $(INCLUDEDIR)
@cp -r $(INCLUDE)/. $(INCLUDEDIR)
noop:
@echo Using prebuilt binaries on Windows.