prototype IR and parser
[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 Makefile
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 #Project root
15 PROJDIR := ..
16 #Output directories for distributables
17 DISTDIR := $(PROJDIR)/dist
18 #Build rules for each source type
19 include .make/buildc.mk
20 include .make/buildhtml.mk
21
22 #Build rules for tools
23 ifdef TOOLS
24 include .make/buildtools.mk
25 endif
26
27 #Set the final target, flags, and objects for app compile
28 APPC := $(CC)
29 APPDEPS := $(strip $(CDEPS) $(CTARG) $(APPDEPS))
30 APPSRC := $(filter %$(COBJSUF),$(APPDEPS))
31 APPTARG := $(CBINDIR)/$(APPNAME)$(APPSUF)
32 APPFLAGS := $(strip $(CXXFLAGS) $(CFLAGS) $(APPFLAGS))
33 APPDIRS := $(sort $(dir $(APPTARG) $(APPDEPS)))
34