blob: ae805af9b7c35e79db99cbdff3b82bed0b348692 (
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
48
49
50
51
52
53
54
55
56
|
## Wrapper Makefile.am to build libluajit.
##
## Copyright (C) 2014 Luigi Scarso <luigi.scarso@gmail.com>
##
## This file is free software; the copyright holder
## gives unlimited permission to copy and/or distribute it,
## with or without modifications, as long as this notice is preserved.
##
## We want to re-distribute the whole original luajit source tree.
##
EXTRA_DIST = $(LUAJIT_TREE)
## Changes applied to the original source tree
##
EXTRA_DIST += $(LUAJIT_TREE)-PATCHES
# in case of an SVN repository
dist-hook:
rm -rf `find $(distdir) -name .svn`
SUBDIRS = native
host_flags = BUILDMODE=static CROSS=$(CROSS)
if WIN32
host_flags += TARGET_SYS=Windows
endif WIN32
noinst_DATA = luajit-build/src/libluajit.a
luajit-build/src/Makefile:
rm -rf luajit-build
$(MKDIR_P) luajit-build
cd luajit-build && cp -r $(abs_srcdir)/$(LUAJIT_TREE)/src src \
&& cp -r $(abs_srcdir)/$(LUAJIT_TREE)/dynasm dynasm \
&& chmod -R u+w src dynasm
native/build-flags: luajit-build/src/Makefile
cd native && $(MAKE) $(AM_MAKEFLAGS) build-flags
luajit-build/src/libluajit.a: native/build-flags
build_flags=`cat native/build-flags` && \
cat native/build-flags
cd luajit-build/src && \
$(MAKE) $(AM_MAKEFLAGS) `if : $(AM_V_P); then echo 'E=@: Q='; fi` \
$(host_flags) $$build_flags
clean-local:
rm -rf luajit-build
# Rebuild
rebuild_prereq =
rebuild_target = all
CLEANFILES =
include $(srcdir)/../../am/rebuild.am
|