-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
58 lines (45 loc) · 1.19 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#modconv_2 Makefile
#Compiler
CC = g++
#Source directories
BASEDIR = ./
SRCDIR = $(BASEDIR)src/
DEPSDIR = $(BASEDIR)deps/
OUTPUTDIR = build
OUTPUTNAME = modconv2
OUTPUTPATH = $(BASEDIR)$(OUTPUTDIR)/$(OUTPUTNAME)
#Project information
PROJECT = modconv 2
AUTHOR = red
BUILDS = release debug debug_all debug_optimizer debug_output
####################
#Build Configuration
####################
#Target files
SRCFILES = $(SRCDIR)main.cxx $(SRCDIR)f3d.cxx $(SRCDIR)collision.cxx $(SRCDIR)animconv.cxx $(SRCDIR)file.cxx
DEPFILES = $(DEPSDIR)lodepng.cpp
#Compiler flags
CFLAGS = -O3
FORCEFLAGS = -Wall -Werror -std=c++17 -Wno-unused-function
LIBS = -lassimp -lstdc++fs
#Debug Flags
DEBUGFLAGS = -g -fsanitize=address,undefined
####################
#Release recipes
all: clean createdir compile
release: all
debug: CFLAGS = $(DEBUGFLAGS)
debug: all
#Main recipes
compile: $(SRCFILES)
$(CC) $(CFLAGS) $(FORCEFLAGS) $(SRCFILES) $(DEPFILES) -o $(OUTPUTPATH) $(LIBS)
clean:
rm -r $(OUTPUTDIR) > /dev/null || true
createdir:
mkdir $(OUTPUTDIR) > /dev/null
#Print help menu
help:
$(info ======== $(PROJECT) ========)
$(info author: $(AUTHOR))
$(info ===========================)
$(info Build types: $(BUILDS))