BuildSys1
[henge/webcc.git] / src / .make / build.mk
1 ##################################################
2 #Desc: Build system for the Application
3 #Author: Mihrtec LLC
4 #Date: 2016
5 ##################################################
6 #Included from ./build.mk
7 #Defines variables used in the make process to
8 #compile C files either to
9 #native asm through gcc, or web through
10 #emscripten
11 ##################################################
12 #Environment Setup
13 ##################################################
14 #Extra modules to build (core is built by default)
15 MODULES :=
16 #Libraries to include
17 LIBS := wolfssl SDL2 SDL2_image SDL2_ttf
18
19 #Build system directory management
20 REPOROOT := ..
21 DISTDIR := $(REPOROOT)/dist
22 BINDIR := $(DISTDIR)/bin
23 EXEDIR := $(BINDIR)/$(shell uname -m)
24 XTDIR := $(REPOROOT)/extern
25 XTLIBDIR := $(XTDIR)/lib
26
27 #Build rules for each source type
28 include .make/buildc.mk
29
30 #Set the final target, flags, and objects for app compile
31 APPDEPS := $(CTARG) $(APPDEPS)
32 APPTARG := $(EXEDIR)/$(APPNAME)$(APPSUFFIX)
33 APPFLAGS := $(CXXFLAGS) $(CFLAGS) $(APPFLAGS)
34 APPDIRS := $(sort $(dir $(APPTARG) $(WEBTARG)))