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
|
# 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 ($(UNAME_S),OpenBSD)
PLAT=openbsd
endif
ifeq ($(patsubst MINGW%,MINGW,$(UNAME_S)),MINGW)
PLAT=mingw
endif
endif
PLAT?= linux
PLATS= macosx linux win32 mingw freebsd openbsd
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
test:
busted
.PHONY: lint
lint:
luacheck .
.PHONY: docs
docs:
ldoc .
|