-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakerules
69 lines (60 loc) · 1.55 KB
/
Makerules
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
59
60
61
62
63
64
65
66
67
68
69
#
# Makerules
#
# Pays attention to the following variables:
# DEBUG = y - debugging compiler flags
# UNAME = xxxxx - cross-compile for the given platform
# (In particular, you can say UNAME = Win32 if mingw
# is installed to cross-compile for Windows, or
# UNAME = Linux to get 32-bit binaries on Linux x64)
# If UNAME undefined on input, gets defined here.
# DESTDIR = xxxx - Place to put output binaries.
# MAKERULESDIR - Where to find Makerules and Makedefs
#
#
# Defines the following variables:
# UNAME - destination system type (if not set by user)
# OBJDIR - directory for object files
# CC - C compiler
# CXX - C++ compiler
# CFLAGS - C compiler flags
# CXXFLAGS - C++ compiler flags
# LDFLAGS - Linker flags
# LIBS - Libraries
# GLLIBS - OpenGL libraries
# EXE - Extension of executables (.exe under Win32)
# LINK - The entire linking process
# STATICLIB - Create .a archive
# SHAREDLIB - Create .so archive
#
#
# Client Makefiles need to define a "default:" rule
# - SMR
#
#
# Define UNAME
#
UNAME := Emcc
#
# Other variable definitions
#
OBJDIR ?= OBJ.$(UNAME)
DESTDIR ?= .
ifndef MAKERULESDIR
MAKERULESDIR := $(subst /,,$(dir $(lastword $(MAKEFILE_LIST))))
endif
#
# Rules
#
all: $(OBJDIR) $(DESTDIR) default
$(OBJDIR) $(DESTDIR):
-mkdir $@
debug:
$(MAKE) DEBUG=y
emcc:
$(MAKE) UNAME=Emcc
.PHONY: all default clean debug emcc
#
# Makedefs
#
include $(MAKERULESDIR)/Makedefs.$(UNAME)