aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/Makefile b/src/Makefile
index 278324a1..0065b8c2 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -42,13 +42,10 @@ CCOPT= -O2 -fomit-frame-pointer
42# 42#
43# Target-specific compiler options: 43# Target-specific compiler options:
44# 44#
45# x86 only: it's recommended to compile at least for i686. Better yet,
46# compile for an architecture that has SSE2, too (-msse -msse2).
47#
48# x86/x64 only: For GCC 4.2 or higher and if you don't intend to distribute 45# x86/x64 only: For GCC 4.2 or higher and if you don't intend to distribute
49# the binaries to a different machine you could also use: -march=native 46# the binaries to a different machine you could also use: -march=native
50# 47#
51CCOPT_x86= -march=i686 48CCOPT_x86= -march=i686 -msse -msse2 -mfpmath=sse
52CCOPT_x64= 49CCOPT_x64=
53CCOPT_arm= 50CCOPT_arm=
54CCOPT_ppc= 51CCOPT_ppc=
@@ -394,11 +391,6 @@ DASM_AFLAGS+= -D VER=$(subst LJ_ARCH_VERSION_,,$(filter LJ_ARCH_VERSION_%,$(subs
394ifeq (Windows,$(TARGET_SYS)) 391ifeq (Windows,$(TARGET_SYS))
395 DASM_AFLAGS+= -D WIN 392 DASM_AFLAGS+= -D WIN
396endif 393endif
397ifeq (x86,$(TARGET_LJARCH))
398 ifneq (,$(findstring __SSE2__ 1,$(TARGET_TESTARCH)))
399 DASM_AFLAGS+= -D SSE
400 endif
401else
402ifeq (x64,$(TARGET_LJARCH)) 394ifeq (x64,$(TARGET_LJARCH))
403 DASM_ARCH= x86 395 DASM_ARCH= x86
404else 396else
@@ -423,7 +415,6 @@ ifeq (ppc,$(TARGET_LJARCH))
423endif 415endif
424endif 416endif
425endif 417endif
426endif
427 418
428DASM_FLAGS= $(DASM_XFLAGS) $(DASM_AFLAGS) 419DASM_FLAGS= $(DASM_XFLAGS) $(DASM_AFLAGS)
429DASM_DASC= vm_$(DASM_ARCH).dasc 420DASM_DASC= vm_$(DASM_ARCH).dasc
@@ -445,7 +436,7 @@ LJLIB_O= lib_base.o lib_math.o lib_bit.o lib_string.o lib_table.o \
445 lib_io.o lib_os.o lib_package.o lib_debug.o lib_jit.o lib_ffi.o 436 lib_io.o lib_os.o lib_package.o lib_debug.o lib_jit.o lib_ffi.o
446LJLIB_C= $(LJLIB_O:.o=.c) 437LJLIB_C= $(LJLIB_O:.o=.c)
447 438
448LJCORE_O= lj_gc.o lj_err.o lj_char.o lj_bc.o lj_obj.o \ 439LJCORE_O= lj_gc.o lj_err.o lj_char.o lj_bc.o lj_obj.o lj_buf.o \
449 lj_str.o lj_tab.o lj_func.o lj_udata.o lj_meta.o lj_debug.o \ 440 lj_str.o lj_tab.o lj_func.o lj_udata.o lj_meta.o lj_debug.o \
450 lj_state.o lj_dispatch.o lj_vmevent.o lj_vmmath.o lj_strscan.o \ 441 lj_state.o lj_dispatch.o lj_vmevent.o lj_vmmath.o lj_strscan.o \
451 lj_api.o lj_lex.o lj_parse.o lj_bcread.o lj_bcwrite.o lj_load.o \ 442 lj_api.o lj_lex.o lj_parse.o lj_bcread.o lj_bcwrite.o lj_load.o \
@@ -567,6 +558,10 @@ amalg:
567clean: 558clean:
568 $(HOST_RM) $(ALL_RM) 559 $(HOST_RM) $(ALL_RM)
569 560
561libbc:
562 ./$(LUAJIT_T) host/genlibbc.lua -o host/buildvm_libbc.h $(LJLIB_C)
563 $(MAKE) all
564
570depend: 565depend:
571 @for file in $(ALL_HDRGEN); do \ 566 @for file in $(ALL_HDRGEN); do \
572 test -f $$file || touch $$file; \ 567 test -f $$file || touch $$file; \
@@ -581,7 +576,7 @@ depend:
581 test -s $$file || $(HOST_RM) $$file; \ 576 test -s $$file || $(HOST_RM) $$file; \
582 done 577 done
583 578
584.PHONY: default all amalg clean depend 579.PHONY: default all amalg clean libbc depend
585 580
586############################################################################## 581##############################################################################
587# Rules for generated files. 582# Rules for generated files.