summaryrefslogtreecommitdiff
path: root/Makefile
blob: 4f4d685a13b2125b80c529e8eb1c6f7f530341c3 (plain)
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
# busted_time makefile
#
# see csrc/makefile for description of how to customize the build
#
# Targets:
#   install            install system independent support
#   install-all        install for lua51 lua52 lua53
#   print              print the build settings

ifeq ($(origin PLAT),undefined)
UNAME_S:=$(shell uname -s)
ifeq ($(UNAME_S),Linux)
    PLAT=linux
endif
ifeq ($(UNAME_S),Darwin)
    PLAT=macosx
endif
ifeq ($(UNAME_S),FreeBSD)
    PLAT=freebsd
endif
ifeq ($(patsubst MINGW%,MINGW,$(UNAME_S)),MINGW)
    PLAT=mingw
endif
endif
PLAT?= linux
PLATS= macosx linux win32 mingw freebsd

all: $(PLAT)

$(PLATS) none install local clean:
	$(MAKE) -C src $@

print:
	$(MAKE) -C src $@

install-all:
	$(MAKE) clean
	@cd src && $(MAKE) $(PLAT) LUA_VERSION=5.1
	@cd src && $(MAKE) install LUA_VERSION=5.1
	$(MAKE) clean
	@cd src && $(MAKE) $(PLAT) LUA_VERSION=5.2
	@cd src && $(MAKE) install LUA_VERSION=5.2
	$(MAKE) clean
	@cd src && $(MAKE) $(PLAT) LUA_VERSION=5.3
	@cd src && $(MAKE) install LUA_VERSION=5.3

.PHONY: test