diff options
author | Taylor C. Richberger <Taywee@gmx.com> | 2016-04-27 15:24:26 -0600 |
---|---|---|
committer | Taylor C. Richberger <Taywee@gmx.com> | 2016-04-27 15:24:26 -0600 |
commit | 3b7f35e1910c44bab7d5d4ade6640c9dfd2ba407 (patch) | |
tree | cad88385cbd301e5fa9b124c832420199e6d0646 /Makefile | |
download | args.hxx-3b7f35e1910c44bab7d5d4ade6640c9dfd2ba407.tar.xz |
initial buildout
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..855ae7c --- /dev/null +++ b/Makefile @@ -0,0 +1,38 @@ +OS = $(shell uname -s) + +CC ?= cc +CXX ?= c++ +DESTDIR ?= /usr +FLAGS += -std=c++11 +ifdef DEBUG +FLAGS += -ggdb -O0 +else +FLAGS += -O3 +endif + +LIBS = glfw3 assimp +CFLAGS += -I. $(FLAGS) -c -MMD `pkg-config --cflags $(LIBS)` +LDFLAGS += $(FLAGS) `pkg-config --libs $(LIBS)` +ifneq ($(OS), Darwin) +LDFLAGS += -lGL +endif + +SOURCES = test.cxx +OBJECTS = $(SOURCES:.cxx=.o) +DEPENDENCIES= $(SOURCES:.cxx=.d) +EXECUTABLE = test + +.PHONY: all clean + +all: $(EXECUTABLE) + +-include $(DEPENDENCIES) + +$(EXECUTABLE): $(OBJECTS) + $(CXX) -o $@ $(OBJECTS) $(LDFLAGS) + +clean : + rm $(EXECUTABLE) $(OBJECTS) $(DEPENDENCIES) + +%.o: %.cxx + $(CXX) $< -o $@ $(CFLAGS) |