-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
56 lines (45 loc) · 1.84 KB
/
Copy pathmakefile
File metadata and controls
56 lines (45 loc) · 1.84 KB
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
export ARCH = x64
export BITS = $(subst 86,32,$(subst x,,$(ARCH)))
export CXX = g++ -m$(BITS)
export CC = gcc -m$(BITS)
export AR = ar -crs
export LD = ld
THIS_PATH := $(abspath makefile)
export ROOTDIR := $(dir $(THIS_PATH))
export MKINCDIR := $(ROOTDIR)build/make/include
include $(MKINCDIR)/common.mk
# Project Names
libAS = angelscript
libPGE = olcPGE
libSTB_image = stb_image
exePXG = pixelgame
all: $(exePXG)
#@echo $(lastword $(subst /, ,$(ROOTDIR)))
$(BUILDDIR)/%:
@-$(MKDIR) $(subst /,\,$@)
$(libAS) $(LIBDIR)/$(libAS).a: $(LIBDIR)
@echo ----------- Building AngelScript Scripting static library -----------
@$(MAKE) -C libs/$(libAS)
$(libSTB_image) $(LIBDIR)/$(libSTB_image).a: $(LIBDIR)
@echo ----------- Building STBimage Library -----------
@$(MAKE) -C libs/$(libSTB_image)
$(libPGE) $(LIBDIR)/$(libPGE).a: $(LIBDIR) $(libSTB_image)
@echo ----------- Building olc PGE static library -----------
@$(MAKE) -C libs/$(libPGE)
$(exePXG) $(LIBDIR)/$(exePXG)/$(exePXG)$(EXEext): pxgdata $(libAS) $(libPGE)
@echo ----------- Building Pixel Game -----------
@$(MAKE) -C $(exePXG)
pxgdata: $(PXGDIR)
@$(COPYDIR) $(subst /,\,"$(COMMONDIR)/pxg" "$(BUILDDIR)/$(exePXG)/pxg")
clean:
@-$(DELDIR) build\x86
@-$(DELDIR) build\x64
@echo ----------- Cleaning AngelScript Language Scripting Library -----------
@$(MAKE) -C libs/$(libAS) clean
@echo ----------- Cleaning STBimage Library -----------
@$(MAKE) -C libs/$(libSTB_image) clean
@echo ----------- Cleaning olcPGE Library -----------
@$(MAKE) -C libs/$(libPGE) clean
@echo ----------- Cleaning Pixel Game -----------
@$(MAKE) -C $(exePXG) clean
.PHONY: all $(libAS) $(libSTB_image) $(libPGE) $(exePXG) pxgdata clean