Skip to content

Commit

Permalink
apply architecture feature options to target build not for local tool…
Browse files Browse the repository at this point in the history
…s build
  • Loading branch information
jmalak committed Apr 14, 2019
1 parent e3fba37 commit c200b40
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions build/mif/local.mif
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,15 @@ additional_cleanup_sys = *.pdb
############################
common_cppflags = -D__FLAT__

common_cppflags_nt = -D__NT__
common_cppflags_nt = -D__NT__

common_cppflags_386 = -D__386__
common_cppflags_x64 =
common_cppflags_386 = -D__386__
common_cppflags_x64 =

common_cppflags_nt_386 = -D__NT_386__
common_cppflags_nt_x64 = -D__NT_X64__

common_cflags_386 =
common_cflags_x64 =

# common release/debug flags
# common release/debug options
!ifdef __INTEL_TOOLS__
common_flags_rel = -Ox -Zi -fast
common_flags_dbg = -Zi -fast
Expand Down Expand Up @@ -104,10 +101,14 @@ common_ldflags = $(common_ldflags_rel)
common_ldflags = $(common_ldflags_dbg)
!endif

# Flags for building DLLs
# Options for building DLLs
common_cflags_lib_shared = -LD
common_clflags_lib_shared = -MT -LD

# Target specific options
target_cflags_386 =
target_cflags_x64 =

# DLL/shared library file extension
ext_lib_shared = .dll

Expand Down Expand Up @@ -146,7 +147,7 @@ bld_incs = $(bld_extra_incs) -I"$(watcom_dir)/h"

bld_cppflags = $(build_cppflags) $(common_cppflags) $(common_cppflags_$(bld_os)) $(common_cppflags_$(bld_cpu)) $(common_cppflags_$(bld_os)_$(bld_cpu))

bld_cflags = $(common_cflags) $(common_cflags_$(bld_cpu)) $(common_flags) -Fo$@
bld_cflags = $(common_cflags) $(common_flags) -Fo$@

bld_c_flags =
bld_cxx_flags = -EHsc
Expand All @@ -159,7 +160,7 @@ bld_ldflags = -link -nologo &
$(bld_extra_ldflags) $(bld_ldflags_$(proj_type))

# options for linking via cl
bld_clflags = $(bld_cppflags) $(common_cflags) $(common_cflags_$(bld_cpu)) $(common_flags) -Fe$@ $(cl_extra_libs_gen) $(bld_ldflags1)
bld_clflags = $(bld_cppflags) $(common_cflags) $(common_flags) -Fe$@ $(cl_extra_libs_gen) $(bld_ldflags1)

bld_libflags = -out:$^@

Expand All @@ -186,8 +187,8 @@ cppflags_x64 = $(common_cppflags_x64) $(common_cppflags_$(host_os)_x64)
c_flags =
cxx_flags = -EHsc

cflags_gen = $(bld_cc_sys) $(common_cflags) $(common_cflags_$(bld_cpu)) $(common_flags) -Fo$@
cflags_dll = $(bld_cc_sys) $(common_cflags) $(common_cflags_$(bld_cpu)) $(common_flags) $(common_cflags_lib_shared) -Fo$@
cflags_gen = $(bld_cc_sys) $(common_cflags) $(target_cflags_$(bld_cpu)) $(common_flags) -Fo$@
cflags_dll = $(bld_cc_sys) $(common_cflags) $(target_cflags_$(bld_cpu)) $(common_flags) $(common_cflags_lib_shared) -Fo$@
cflags_wind = $(cflags_gen)

# options for linking
Expand Down Expand Up @@ -281,13 +282,7 @@ common_cppflags_osx_x64 = -D__OSX_X64__
common_cppflags_osx_ppc =
common_cppflags_osx_arm = -D__OSX_ARM__

common_cflags_386 =
common_cflags_x64 = -march=core2
common_cflags_ppc =
common_cflags_mps =
common_cflags_arm =

# common release/debug flags
# common release/debug options
common_flags_rel = -O -g
common_flags_dbg = -g
!ifeq release 1
Expand All @@ -312,10 +307,17 @@ common_ldflags = $(common_ldflags_rel)
common_ldflags = $(common_ldflags_dbg)
!endif

# Flags for building DLLs
# Options for building DLLs
common_cflags_lib_shared = -fPIC
common_clflags_lib_shared = -shared

# Target specific options
target_cflags_386 =
target_cflags_x64 = -march=core2
target_cflags_ppc =
target_cflags_mps =
target_cflags_arm =

# DLL/shared library file extension
ext_lib_shared = .so

Expand Down Expand Up @@ -354,7 +356,7 @@ bld_incs = $(bld_extra_incs) -I"$(watcom_dir)/h"

bld_cppflags = $(build_cppflags) $(common_cppflags) $(common_cppflags_$(bld_os)) $(common_cppflags_$(bld_cpu)) $(common_cppflags_$(bld_os)_$(bld_cpu))

bld_cflags = $(common_cflags) $(common_cflags_$(bld_cpu)) $(common_flags) -o $@
bld_cflags = $(common_cflags) $(common_flags) -o $@

bld_c_flags =
bld_cxx_flags = -std=c++98
Expand Down Expand Up @@ -388,7 +390,7 @@ bld_ldflags1 = $(common_ldflags) -Wl,-Map,$^&.map
bld_ldflags = $(bld_extra_ldflags) $(bld_ldflags_$(proj_type))

# options for linking via cl
bld_clflags = $(bld_cppflags) $(common_cflags) $(common_cflags_$(bld_cpu)) $(common_flags) -o $@ $(cl_extra_libs_gen) $(bld_ldflags1)
bld_clflags = $(bld_cppflags) $(common_cflags) $(common_flags) -o $@ $(cl_extra_libs_gen) $(bld_ldflags1)

bld_libflags = crs $^@

Expand Down Expand Up @@ -421,8 +423,8 @@ cppflags_arm = $(common_cppflags_arm) $(common_cppflags_$(host_os)_arm)
c_flags =
cxx_flags = -std=c++98

cflags_gen = $(bld_cc_sys) $(common_cflags) $(common_cflags_$(bld_cpu)) $(common_flags) -o $@
cflags_dll = $(bld_cc_sys) $(common_cflags) $(common_cflags_$(bld_cpu)) $(common_flags) $(common_cflags_lib_shared) -o $@
cflags_gen = $(bld_cc_sys) $(common_cflags) $(target_cflags_$(bld_cpu)) $(common_flags) -o $@
cflags_dll = $(bld_cc_sys) $(common_cflags) $(target_cflags_$(bld_cpu)) $(common_flags) $(common_cflags_lib_shared) -o $@
cflags_wind = $(cflags_gen)

# options for linking
Expand Down

0 comments on commit c200b40

Please sign in to comment.