aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile127
1 files changed, 88 insertions, 39 deletions
diff --git a/src/Makefile b/src/Makefile
index d841abf8..bac0341e 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -11,7 +11,7 @@
11############################################################################## 11##############################################################################
12 12
13MAJVER= 2 13MAJVER= 2
14MINVER= 0 14MINVER= 1
15ABIVER= 5.1 15ABIVER= 5.1
16NODOTABIVER= 51 16NODOTABIVER= 51
17 17
@@ -43,17 +43,14 @@ CCOPT= -O2 -fomit-frame-pointer
43# 43#
44# Target-specific compiler options: 44# Target-specific compiler options:
45# 45#
46# x86 only: it's recommended to compile at least for i686. Better yet,
47# compile for an architecture that has SSE2, too (-msse -msse2).
48#
49# x86/x64 only: For GCC 4.2 or higher and if you don't intend to distribute 46# x86/x64 only: For GCC 4.2 or higher and if you don't intend to distribute
50# the binaries to a different machine you could also use: -march=native 47# the binaries to a different machine you could also use: -march=native
51# 48#
52CCOPT_x86= -march=i686 49CCOPT_x86= -march=i686 -msse -msse2 -mfpmath=sse
53CCOPT_x64= 50CCOPT_x64=
54CCOPT_arm= 51CCOPT_arm=
52CCOPT_arm64=
55CCOPT_ppc= 53CCOPT_ppc=
56CCOPT_ppcspe=
57CCOPT_mips= 54CCOPT_mips=
58# 55#
59CCDEBUG= 56CCDEBUG=
@@ -112,6 +109,9 @@ XCFLAGS=
112#XCFLAGS+= -DLUAJIT_NUMMODE=1 109#XCFLAGS+= -DLUAJIT_NUMMODE=1
113#XCFLAGS+= -DLUAJIT_NUMMODE=2 110#XCFLAGS+= -DLUAJIT_NUMMODE=2
114# 111#
112# Disable LJ_GC64 mode for x64.
113#XCFLAGS+= -DLUAJIT_DISABLE_GC64
114#
115############################################################################## 115##############################################################################
116 116
117############################################################################## 117##############################################################################
@@ -123,15 +123,14 @@ XCFLAGS=
123# 123#
124# Use the system provided memory allocator (realloc) instead of the 124# Use the system provided memory allocator (realloc) instead of the
125# bundled memory allocator. This is slower, but sometimes helpful for 125# bundled memory allocator. This is slower, but sometimes helpful for
126# debugging. This option cannot be enabled on x64, since realloc usually 126# debugging. This option cannot be enabled on x64 without GC64, since
127# doesn't return addresses in the right address range. 127# realloc usually doesn't return addresses in the right address range.
128# OTOH this option is mandatory for Valgrind's memcheck tool on x64 and 128# OTOH this option is mandatory for Valgrind's memcheck tool on x64 and
129# the only way to get useful results from it for all other architectures. 129# the only way to get useful results from it for all other architectures.
130#XCFLAGS+= -DLUAJIT_USE_SYSMALLOC 130#XCFLAGS+= -DLUAJIT_USE_SYSMALLOC
131# 131#
132# This define is required to run LuaJIT under Valgrind. The Valgrind 132# This define is required to run LuaJIT under Valgrind. The Valgrind
133# header files must be installed. You should enable debug information, too. 133# header files must be installed. You should enable debug information, too.
134# Use --suppressions=lj.supp to avoid some false positives.
135#XCFLAGS+= -DLUAJIT_USE_VALGRIND 134#XCFLAGS+= -DLUAJIT_USE_VALGRIND
136# 135#
137# This is the client for the GDB JIT API. GDB 7.0 or higher is required 136# This is the client for the GDB JIT API. GDB 7.0 or higher is required
@@ -188,7 +187,8 @@ endif
188# make HOST_CC="gcc -m32" CROSS=i586-mingw32msvc- TARGET_SYS=Windows 187# make HOST_CC="gcc -m32" CROSS=i586-mingw32msvc- TARGET_SYS=Windows
189# make HOST_CC="gcc -m32" CROSS=powerpc-linux-gnu- 188# make HOST_CC="gcc -m32" CROSS=powerpc-linux-gnu-
190 189
191CCOPTIONS= $(CCDEBUG) $(CCOPT) $(CCWARN) $(XCFLAGS) $(CFLAGS) 190ASOPTIONS= $(CCOPT) $(CCWARN) $(XCFLAGS) $(CFLAGS)
191CCOPTIONS= $(CCDEBUG) $(ASOPTIONS)
192LDOPTIONS= $(CCDEBUG) $(LDFLAGS) 192LDOPTIONS= $(CCDEBUG) $(LDFLAGS)
193 193
194HOST_CC= $(CC) 194HOST_CC= $(CC)
@@ -228,6 +228,7 @@ TARGET_XLDFLAGS=
228TARGET_XLIBS= -lm 228TARGET_XLIBS= -lm
229TARGET_TCFLAGS= $(CCOPTIONS) $(TARGET_XCFLAGS) $(TARGET_FLAGS) $(TARGET_CFLAGS) 229TARGET_TCFLAGS= $(CCOPTIONS) $(TARGET_XCFLAGS) $(TARGET_FLAGS) $(TARGET_CFLAGS)
230TARGET_ACFLAGS= $(CCOPTIONS) $(TARGET_XCFLAGS) $(TARGET_FLAGS) $(TARGET_CFLAGS) 230TARGET_ACFLAGS= $(CCOPTIONS) $(TARGET_XCFLAGS) $(TARGET_FLAGS) $(TARGET_CFLAGS)
231TARGET_ASFLAGS= $(ASOPTIONS) $(TARGET_XCFLAGS) $(TARGET_FLAGS) $(TARGET_CFLAGS)
231TARGET_ALDFLAGS= $(LDOPTIONS) $(TARGET_XLDFLAGS) $(TARGET_FLAGS) $(TARGET_LDFLAGS) 232TARGET_ALDFLAGS= $(LDOPTIONS) $(TARGET_XLDFLAGS) $(TARGET_FLAGS) $(TARGET_LDFLAGS)
232TARGET_ASHLDFLAGS= $(LDOPTIONS) $(TARGET_XSHLDFLAGS) $(TARGET_FLAGS) $(TARGET_SHLDFLAGS) 233TARGET_ASHLDFLAGS= $(LDOPTIONS) $(TARGET_XSHLDFLAGS) $(TARGET_FLAGS) $(TARGET_SHLDFLAGS)
233TARGET_ALIBS= $(TARGET_XLIBS) $(LIBS) $(TARGET_LIBS) 234TARGET_ALIBS= $(TARGET_XLIBS) $(LIBS) $(TARGET_LIBS)
@@ -242,17 +243,29 @@ else
242ifneq (,$(findstring LJ_TARGET_ARM ,$(TARGET_TESTARCH))) 243ifneq (,$(findstring LJ_TARGET_ARM ,$(TARGET_TESTARCH)))
243 TARGET_LJARCH= arm 244 TARGET_LJARCH= arm
244else 245else
246ifneq (,$(findstring LJ_TARGET_ARM64 ,$(TARGET_TESTARCH)))
247 ifneq (,$(findstring __AARCH64EB__ ,$(TARGET_TESTARCH)))
248 TARGET_ARCH= -D__AARCH64EB__=1
249 endif
250 TARGET_LJARCH= arm64
251else
245ifneq (,$(findstring LJ_TARGET_PPC ,$(TARGET_TESTARCH))) 252ifneq (,$(findstring LJ_TARGET_PPC ,$(TARGET_TESTARCH)))
253 ifneq (,$(findstring LJ_LE 1,$(TARGET_TESTARCH)))
254 TARGET_ARCH= -DLJ_ARCH_ENDIAN=LUAJIT_LE
255 else
256 TARGET_ARCH= -DLJ_ARCH_ENDIAN=LUAJIT_BE
257 endif
246 TARGET_LJARCH= ppc 258 TARGET_LJARCH= ppc
247else 259else
248ifneq (,$(findstring LJ_TARGET_PPCSPE ,$(TARGET_TESTARCH)))
249 TARGET_LJARCH= ppcspe
250else
251ifneq (,$(findstring LJ_TARGET_MIPS ,$(TARGET_TESTARCH))) 260ifneq (,$(findstring LJ_TARGET_MIPS ,$(TARGET_TESTARCH)))
252 ifneq (,$(findstring MIPSEL ,$(TARGET_TESTARCH))) 261 ifneq (,$(findstring MIPSEL ,$(TARGET_TESTARCH)))
253 TARGET_ARCH= -D__MIPSEL__=1 262 TARGET_ARCH= -D__MIPSEL__=1
254 endif 263 endif
255 TARGET_LJARCH= mips 264 ifneq (,$(findstring LJ_TARGET_MIPS64 ,$(TARGET_TESTARCH)))
265 TARGET_LJARCH= mips64
266 else
267 TARGET_LJARCH= mips
268 endif
256else 269else
257 $(error Unsupported target architecture) 270 $(error Unsupported target architecture)
258endif 271endif
@@ -266,6 +279,7 @@ ifneq (,$(findstring LJ_TARGET_PS3 1,$(TARGET_TESTARCH)))
266 TARGET_SYS= PS3 279 TARGET_SYS= PS3
267 TARGET_ARCH+= -D__CELLOS_LV2__ 280 TARGET_ARCH+= -D__CELLOS_LV2__
268 TARGET_XCFLAGS+= -DLUAJIT_USE_SYSMALLOC 281 TARGET_XCFLAGS+= -DLUAJIT_USE_SYSMALLOC
282 TARGET_XLIBS+= -lpthread
269endif 283endif
270 284
271TARGET_XCFLAGS+= $(CCOPT_$(TARGET_LJARCH)) 285TARGET_XCFLAGS+= $(CCOPT_$(TARGET_LJARCH))
@@ -285,6 +299,9 @@ endif
285ifneq (,$(LMULTILIB)) 299ifneq (,$(LMULTILIB))
286 TARGET_XCFLAGS+= -DLUA_LMULTILIB=\"$(LMULTILIB)\" 300 TARGET_XCFLAGS+= -DLUA_LMULTILIB=\"$(LMULTILIB)\"
287endif 301endif
302ifneq (,$(INSTALL_LJLIBD))
303 TARGET_XCFLAGS+= -DLUA_LJDIR=\"$(INSTALL_LJLIBD)\"
304endif
288 305
289############################################################################## 306##############################################################################
290# Target system detection. 307# Target system detection.
@@ -305,20 +322,27 @@ ifeq (Darwin,$(TARGET_SYS))
305 $(error missing: export MACOSX_DEPLOYMENT_TARGET=XX.YY) 322 $(error missing: export MACOSX_DEPLOYMENT_TARGET=XX.YY)
306 endif 323 endif
307 TARGET_STRIP+= -x 324 TARGET_STRIP+= -x
308 TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC 325 TARGET_XCFLAGS+= -DLUAJIT_UNWIND_EXTERNAL
326 TARGET_XSHLDFLAGS= -dynamiclib -undefined dynamic_lookup -fPIC
309 TARGET_DYNXLDOPTS= 327 TARGET_DYNXLDOPTS=
310 TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).255 328 TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).255
311 ifeq (x64,$(TARGET_LJARCH))
312 TARGET_XLDFLAGS+= -pagezero_size 10000 -image_base 100000000
313 TARGET_XSHLDFLAGS+= -image_base 7fff04c4a000
314 endif
315else 329else
316ifeq (iOS,$(TARGET_SYS)) 330ifeq (iOS,$(TARGET_SYS))
317 TARGET_STRIP+= -x 331 TARGET_STRIP+= -x
318 TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC 332 TARGET_XSHLDFLAGS= -dynamiclib -undefined dynamic_lookup -fPIC
319 TARGET_DYNXLDOPTS= 333 TARGET_DYNXLDOPTS=
320 TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).255 334 TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).255
335 ifeq (arm64,$(TARGET_LJARCH))
336 TARGET_XCFLAGS+= -fno-omit-frame-pointer
337 endif
321else 338else
339 ifeq (,$(findstring LJ_NO_UNWIND 1,$(TARGET_TESTARCH)))
340 # Find out whether the target toolchain always generates unwind tables.
341 TARGET_TESTUNWIND=$(shell exec 2>/dev/null; echo 'extern void b(void);int a(void){b();return 0;}' | $(TARGET_CC) -c -x c - -o tmpunwind.o && { grep -qa -e eh_frame -e __unwind_info tmpunwind.o || grep -qU -e eh_frame -e __unwind_info tmpunwind.o; } && echo E; rm -f tmpunwind.o)
342 ifneq (,$(findstring E,$(TARGET_TESTUNWIND)))
343 TARGET_XCFLAGS+= -DLUAJIT_UNWIND_EXTERNAL
344 endif
345 endif
322 ifneq (SunOS,$(TARGET_SYS)) 346 ifneq (SunOS,$(TARGET_SYS))
323 ifneq (PS3,$(TARGET_SYS)) 347 ifneq (PS3,$(TARGET_SYS))
324 TARGET_XLDFLAGS+= -Wl,-E 348 TARGET_XLDFLAGS+= -Wl,-E
@@ -330,6 +354,9 @@ else
330 ifeq (GNU/kFreeBSD,$(TARGET_SYS)) 354 ifeq (GNU/kFreeBSD,$(TARGET_SYS))
331 TARGET_XLIBS+= -ldl 355 TARGET_XLIBS+= -ldl
332 endif 356 endif
357 ifeq (GNU,$(TARGET_SYS))
358 TARGET_XLIBS+= -ldl
359 endif
333endif 360endif
334endif 361endif
335endif 362endif
@@ -345,7 +372,7 @@ ifneq ($(HOST_SYS),$(TARGET_SYS))
345 HOST_XCFLAGS+= -DLUAJIT_OS=LUAJIT_OS_OSX 372 HOST_XCFLAGS+= -DLUAJIT_OS=LUAJIT_OS_OSX
346 else 373 else
347 ifeq (iOS,$(TARGET_SYS)) 374 ifeq (iOS,$(TARGET_SYS))
348 HOST_XCFLAGS+= -DLUAJIT_OS=LUAJIT_OS_OSX 375 HOST_XCFLAGS+= -DLUAJIT_OS=LUAJIT_OS_OSX -DTARGET_OS_IPHONE=1
349 else 376 else
350 HOST_XCFLAGS+= -DLUAJIT_OS=LUAJIT_OS_OTHER 377 HOST_XCFLAGS+= -DLUAJIT_OS=LUAJIT_OS_OTHER
351 endif 378 endif
@@ -379,6 +406,11 @@ DASM_XFLAGS=
379DASM_AFLAGS= 406DASM_AFLAGS=
380DASM_ARCH= $(TARGET_LJARCH) 407DASM_ARCH= $(TARGET_LJARCH)
381 408
409ifneq (,$(findstring LJ_LE 1,$(TARGET_TESTARCH)))
410 DASM_AFLAGS+= -D ENDIAN_LE
411else
412 DASM_AFLAGS+= -D ENDIAN_BE
413endif
382ifneq (,$(findstring LJ_ARCH_BITS 64,$(TARGET_TESTARCH))) 414ifneq (,$(findstring LJ_ARCH_BITS 64,$(TARGET_TESTARCH)))
383 DASM_AFLAGS+= -D P64 415 DASM_AFLAGS+= -D P64
384endif 416endif
@@ -407,23 +439,35 @@ ifneq (,$(findstring LJ_NO_UNWIND 1,$(TARGET_TESTARCH)))
407 DASM_AFLAGS+= -D NO_UNWIND 439 DASM_AFLAGS+= -D NO_UNWIND
408 TARGET_ARCH+= -DLUAJIT_NO_UNWIND 440 TARGET_ARCH+= -DLUAJIT_NO_UNWIND
409endif 441endif
442ifneq (,$(findstring LJ_ABI_PAUTH 1,$(TARGET_TESTARCH)))
443 DASM_AFLAGS+= -D PAUTH
444 TARGET_ARCH+= -DLJ_ABI_PAUTH=1
445endif
446ifneq (,$(findstring LJ_ABI_BRANCH_TRACK 1,$(TARGET_TESTARCH)))
447 DASM_AFLAGS+= -D BRANCH_TRACK
448 TARGET_ARCH+= -DLJ_ABI_BRANCH_TRACK=1
449endif
450ifneq (,$(findstring LJ_ABI_SHADOW_STACK 1,$(TARGET_TESTARCH)))
451 DASM_AFLAGS+= -D SHADOW_STACK
452 TARGET_ARCH+= -DLJ_ABI_SHADOW_STACK=1
453endif
410DASM_AFLAGS+= -D VER=$(subst LJ_ARCH_VERSION_,,$(filter LJ_ARCH_VERSION_%,$(subst LJ_ARCH_VERSION ,LJ_ARCH_VERSION_,$(TARGET_TESTARCH)))) 454DASM_AFLAGS+= -D VER=$(subst LJ_ARCH_VERSION_,,$(filter LJ_ARCH_VERSION_%,$(subst LJ_ARCH_VERSION ,LJ_ARCH_VERSION_,$(TARGET_TESTARCH))))
411ifeq (Windows,$(TARGET_SYS)) 455ifeq (Windows,$(TARGET_SYS))
412 DASM_AFLAGS+= -D WIN 456 DASM_AFLAGS+= -D WIN
413endif 457endif
414ifeq (x86,$(TARGET_LJARCH))
415 ifneq (,$(findstring __SSE2__ 1,$(TARGET_TESTARCH)))
416 DASM_AFLAGS+= -D SSE
417 endif
418else
419ifeq (x64,$(TARGET_LJARCH)) 458ifeq (x64,$(TARGET_LJARCH))
420 DASM_ARCH= x86 459 ifeq (,$(findstring LJ_FR2 1,$(TARGET_TESTARCH)))
460 DASM_ARCH= x86
461 endif
421else 462else
422ifeq (arm,$(TARGET_LJARCH)) 463ifeq (arm,$(TARGET_LJARCH))
423 ifeq (iOS,$(TARGET_SYS)) 464 ifeq (iOS,$(TARGET_SYS))
424 DASM_AFLAGS+= -D IOS 465 DASM_AFLAGS+= -D IOS
425 endif 466 endif
426else 467else
468ifneq (,$(findstring LJ_TARGET_MIPSR6 ,$(TARGET_TESTARCH)))
469 DASM_AFLAGS+= -D MIPSR6
470endif
427ifeq (ppc,$(TARGET_LJARCH)) 471ifeq (ppc,$(TARGET_LJARCH))
428 ifneq (,$(findstring LJ_ARCH_SQRT 1,$(TARGET_TESTARCH))) 472 ifneq (,$(findstring LJ_ARCH_SQRT 1,$(TARGET_TESTARCH)))
429 DASM_AFLAGS+= -D SQRT 473 DASM_AFLAGS+= -D SQRT
@@ -431,7 +475,7 @@ ifeq (ppc,$(TARGET_LJARCH))
431 ifneq (,$(findstring LJ_ARCH_ROUND 1,$(TARGET_TESTARCH))) 475 ifneq (,$(findstring LJ_ARCH_ROUND 1,$(TARGET_TESTARCH)))
432 DASM_AFLAGS+= -D ROUND 476 DASM_AFLAGS+= -D ROUND
433 endif 477 endif
434 ifneq (,$(findstring LJ_ARCH_PPC64 1,$(TARGET_TESTARCH))) 478 ifneq (,$(findstring LJ_ARCH_PPC32ON64 1,$(TARGET_TESTARCH)))
435 DASM_AFLAGS+= -D GPR64 479 DASM_AFLAGS+= -D GPR64
436 endif 480 endif
437 ifeq (PS3,$(TARGET_SYS)) 481 ifeq (PS3,$(TARGET_SYS))
@@ -440,7 +484,6 @@ ifeq (ppc,$(TARGET_LJARCH))
440endif 484endif
441endif 485endif
442endif 486endif
443endif
444 487
445DASM_FLAGS= $(DASM_XFLAGS) $(DASM_AFLAGS) 488DASM_FLAGS= $(DASM_XFLAGS) $(DASM_AFLAGS)
446DASM_DASC= vm_$(DASM_ARCH).dasc 489DASM_DASC= vm_$(DASM_ARCH).dasc
@@ -461,19 +504,22 @@ BUILDVM_X= $(BUILDVM_T)
461HOST_O= $(MINILUA_O) $(BUILDVM_O) 504HOST_O= $(MINILUA_O) $(BUILDVM_O)
462HOST_T= $(MINILUA_T) $(BUILDVM_T) 505HOST_T= $(MINILUA_T) $(BUILDVM_T)
463 506
464LJVM_S= lj_vm.s 507LJVM_S= lj_vm.S
465LJVM_O= lj_vm.o 508LJVM_O= lj_vm.o
466LJVM_BOUT= $(LJVM_S) 509LJVM_BOUT= $(LJVM_S)
467LJVM_MODE= elfasm 510LJVM_MODE= elfasm
468 511
469LJLIB_O= lib_base.o lib_math.o lib_bit.o lib_string.o lib_table.o \ 512LJLIB_O= lib_base.o lib_math.o lib_bit.o lib_string.o lib_table.o \
470 lib_io.o lib_os.o lib_package.o lib_debug.o lib_jit.o lib_ffi.o 513 lib_io.o lib_os.o lib_package.o lib_debug.o lib_jit.o lib_ffi.o \
514 lib_buffer.o
471LJLIB_C= $(LJLIB_O:.o=.c) 515LJLIB_C= $(LJLIB_O:.o=.c)
472 516
473LJCORE_O= lj_gc.o lj_err.o lj_char.o lj_bc.o lj_obj.o \ 517LJCORE_O= lj_assert.o lj_gc.o lj_err.o lj_char.o lj_bc.o lj_obj.o lj_buf.o \
474 lj_str.o lj_tab.o lj_func.o lj_udata.o lj_meta.o lj_debug.o \ 518 lj_str.o lj_tab.o lj_func.o lj_udata.o lj_meta.o lj_debug.o \
475 lj_state.o lj_dispatch.o lj_vmevent.o lj_vmmath.o lj_strscan.o \ 519 lj_prng.o lj_state.o lj_dispatch.o lj_vmevent.o lj_vmmath.o \
476 lj_api.o lj_lex.o lj_parse.o lj_bcread.o lj_bcwrite.o lj_load.o \ 520 lj_strscan.o lj_strfmt.o lj_strfmt_num.o lj_serialize.o \
521 lj_api.o lj_profile.o \
522 lj_lex.o lj_parse.o lj_bcread.o lj_bcwrite.o lj_load.o \
477 lj_ir.o lj_opt_mem.o lj_opt_fold.o lj_opt_narrow.o \ 523 lj_ir.o lj_opt_mem.o lj_opt_fold.o lj_opt_narrow.o \
478 lj_opt_dce.o lj_opt_loop.o lj_opt_split.o lj_opt_sink.o \ 524 lj_opt_dce.o lj_opt_loop.o lj_opt_split.o lj_opt_sink.o \
479 lj_mcode.o lj_snap.o lj_record.o lj_crecord.o lj_ffrecord.o \ 525 lj_mcode.o lj_snap.o lj_record.o lj_crecord.o lj_ffrecord.o \
@@ -588,12 +634,15 @@ E= @echo
588default all: $(TARGET_T) 634default all: $(TARGET_T)
589 635
590amalg: 636amalg:
591 @grep "^[+|]" ljamalg.c
592 $(MAKE) all "LJCORE_O=ljamalg.o" 637 $(MAKE) all "LJCORE_O=ljamalg.o"
593 638
594clean: 639clean:
595 $(HOST_RM) $(ALL_RM) 640 $(HOST_RM) $(ALL_RM)
596 641
642libbc:
643 ./$(LUAJIT_T) host/genlibbc.lua -o host/buildvm_libbc.h $(LJLIB_C)
644 $(MAKE) all
645
597depend: 646depend:
598 @for file in $(ALL_HDRGEN); do \ 647 @for file in $(ALL_HDRGEN); do \
599 test -f $$file || touch $$file; \ 648 test -f $$file || touch $$file; \
@@ -608,7 +657,7 @@ depend:
608 test -s $$file || $(HOST_RM) $$file; \ 657 test -s $$file || $(HOST_RM) $$file; \
609 done 658 done
610 659
611.PHONY: default all amalg clean depend 660.PHONY: default all amalg clean libbc depend
612 661
613############################################################################## 662##############################################################################
614# Rules for generated files. 663# Rules for generated files.
@@ -670,10 +719,10 @@ lj_folddef.h: $(BUILDVM_T) lj_opt_fold.c
670 $(Q)$(TARGET_DYNCC) $(TARGET_ACFLAGS) -c -o $(@:.o=_dyn.o) $< 719 $(Q)$(TARGET_DYNCC) $(TARGET_ACFLAGS) -c -o $(@:.o=_dyn.o) $<
671 $(Q)$(TARGET_CC) $(TARGET_ACFLAGS) -c -o $@ $< 720 $(Q)$(TARGET_CC) $(TARGET_ACFLAGS) -c -o $@ $<
672 721
673%.o: %.s 722%.o: %.S
674 $(E) "ASM $@" 723 $(E) "ASM $@"
675 $(Q)$(TARGET_DYNCC) $(TARGET_ACFLAGS) -c -o $(@:.o=_dyn.o) $< 724 $(Q)$(TARGET_DYNCC) $(TARGET_ASFLAGS) -c -o $(@:.o=_dyn.o) $<
676 $(Q)$(TARGET_CC) $(TARGET_ACFLAGS) -c -o $@ $< 725 $(Q)$(TARGET_CC) $(TARGET_ASFLAGS) -c -o $@ $<
677 726
678$(LUAJIT_O): 727$(LUAJIT_O):
679 $(E) "CC $@" 728 $(E) "CC $@"