Commit 194e09ba authored by Alexandre Julliard's avatar Alexandre Julliard

makefiles: Add separate variables for Unix flags and libraries.

parent e2d96342
...@@ -2,7 +2,7 @@ MODULE = bcrypt.dll ...@@ -2,7 +2,7 @@ MODULE = bcrypt.dll
IMPORTS = advapi32 IMPORTS = advapi32
IMPORTLIB = bcrypt IMPORTLIB = bcrypt
UNIXLIB = bcrypt.so UNIXLIB = bcrypt.so
EXTRAINCL = $(GNUTLS_CFLAGS) UNIX_CFLAGS = $(GNUTLS_CFLAGS)
C_SRCS = \ C_SRCS = \
bcrypt_main.c \ bcrypt_main.c \
......
MODULE = capi2032.dll MODULE = capi2032.dll
UNIXLIB = capi2032.so UNIXLIB = capi2032.so
IMPORTLIB = capi2032 IMPORTLIB = capi2032
EXTRALIBS = $(CAPI20_LIBS) UNIX_LIBS = $(CAPI20_LIBS)
EXTRAINCL = $(CAPI20_CFLAGS) UNIX_CFLAGS = $(CAPI20_CFLAGS)
C_SRCS = \ C_SRCS = \
cap20wxx.c \ cap20wxx.c \
......
...@@ -3,8 +3,8 @@ UNIXLIB = crypt32.so ...@@ -3,8 +3,8 @@ UNIXLIB = crypt32.so
IMPORTLIB = crypt32 IMPORTLIB = crypt32
IMPORTS = user32 advapi32 bcrypt IMPORTS = user32 advapi32 bcrypt
DELAYIMPORTS = cryptnet DELAYIMPORTS = cryptnet
EXTRALIBS = $(SECURITY_LIBS) UNIX_LIBS = $(SECURITY_LIBS)
EXTRAINCL = $(GNUTLS_CFLAGS) UNIX_CFLAGS = $(GNUTLS_CFLAGS)
C_SRCS = \ C_SRCS = \
base64.c \ base64.c \
......
...@@ -2,7 +2,7 @@ MODULE = dnsapi.dll ...@@ -2,7 +2,7 @@ MODULE = dnsapi.dll
UNIXLIB = dnsapi.so UNIXLIB = dnsapi.so
IMPORTLIB = dnsapi IMPORTLIB = dnsapi
DELAYIMPORTS = netapi32 DELAYIMPORTS = netapi32
EXTRALIBS = $(RESOLV_LIBS) UNIX_LIBS = $(RESOLV_LIBS)
C_SRCS = \ C_SRCS = \
libresolv.c \ libresolv.c \
......
...@@ -2,7 +2,7 @@ MODULE = dwrite.dll ...@@ -2,7 +2,7 @@ MODULE = dwrite.dll
IMPORTLIB = dwrite IMPORTLIB = dwrite
UNIXLIB = dwrite.so UNIXLIB = dwrite.so
IMPORTS = user32 gdi32 advapi32 IMPORTS = user32 gdi32 advapi32
EXTRAINCL = $(FREETYPE_CFLAGS) UNIX_CFLAGS = $(FREETYPE_CFLAGS)
C_SRCS = \ C_SRCS = \
analyzer.c \ analyzer.c \
......
MODULE = gphoto2.ds MODULE = gphoto2.ds
UNIXLIB = gphoto2.so UNIXLIB = gphoto2.so
IMPORTS = $(JPEG_PE_LIBS) comctl32 user32 gdi32 advapi32 IMPORTS = $(JPEG_PE_LIBS) comctl32 user32 gdi32 advapi32
EXTRALIBS = $(GPHOTO2_LIBS) $(GPHOTO2_PORT_LIBS) EXTRAINCL = $(JPEG_PE_CFLAGS)
EXTRAINCL = $(GPHOTO2_CFLAGS) $(GPHOTO2_PORT_CFLAGS) $(JPEG_PE_CFLAGS) UNIX_LIBS = $(GPHOTO2_LIBS) $(GPHOTO2_PORT_LIBS)
UNIX_CFLAGS = $(GPHOTO2_CFLAGS) $(GPHOTO2_PORT_CFLAGS)
C_SRCS = \ C_SRCS = \
capability.c \ capability.c \
......
MODULE = kerberos.dll MODULE = kerberos.dll
UNIXLIB = kerberos.so UNIXLIB = kerberos.so
EXTRAINCL = $(KRB5_CFLAGS) $(GSSAPI_CFLAGS) UNIX_CFLAGS = $(KRB5_CFLAGS) $(GSSAPI_CFLAGS)
C_SRCS = \ C_SRCS = \
krb5_ap.c \ krb5_ap.c \
......
...@@ -2,8 +2,8 @@ MODULE = mountmgr.sys ...@@ -2,8 +2,8 @@ MODULE = mountmgr.sys
UNIXLIB = mountmgr.so UNIXLIB = mountmgr.so
IMPORTS = uuid advapi32 ntoskrnl IMPORTS = uuid advapi32 ntoskrnl
DELAYIMPORTS = user32 DELAYIMPORTS = user32
EXTRAINCL = $(DBUS_CFLAGS) $(HAL_CFLAGS) UNIX_CFLAGS = $(DBUS_CFLAGS) $(HAL_CFLAGS)
EXTRALIBS = $(DISKARBITRATION_LIBS) $(SYSTEMCONFIGURATION_LIBS) $(CORESERVICES_LIBS) $(SECURITY_LIBS) UNIX_LIBS = $(DISKARBITRATION_LIBS) $(SYSTEMCONFIGURATION_LIBS) $(CORESERVICES_LIBS) $(SECURITY_LIBS)
EXTRADLLFLAGS = -Wl,--subsystem,native EXTRADLLFLAGS = -Wl,--subsystem,native
......
MODULE = nsiproxy.sys MODULE = nsiproxy.sys
UNIXLIB = nsiproxy.so UNIXLIB = nsiproxy.so
IMPORTS = ntoskrnl IMPORTS = ntoskrnl
EXTRALIBS = $(PROCSTAT_LIBS) UNIX_LIBS = $(PROCSTAT_LIBS)
EXTRADLLFLAGS = -Wl,--subsystem,native EXTRADLLFLAGS = -Wl,--subsystem,native
......
...@@ -3,8 +3,8 @@ MODULE = ntdll.dll ...@@ -3,8 +3,8 @@ MODULE = ntdll.dll
UNIXLIB = ntdll.so UNIXLIB = ntdll.so
IMPORTLIB = ntdll IMPORTLIB = ntdll
IMPORTS = winecrt0 IMPORTS = winecrt0
EXTRAINCL = $(UNWIND_CFLAGS) UNIX_CFLAGS = $(UNWIND_CFLAGS)
EXTRALIBS = $(IOKIT_LIBS) $(COREFOUNDATION_LIBS) $(CORESERVICES_LIBS) $(RT_LIBS) $(PTHREAD_LIBS) $(UNWIND_LIBS) $(I386_LIBS) $(PROCSTAT_LIBS) UNIX_LIBS = $(IOKIT_LIBS) $(COREFOUNDATION_LIBS) $(CORESERVICES_LIBS) $(RT_LIBS) $(PTHREAD_LIBS) $(UNWIND_LIBS) $(I386_LIBS) $(PROCSTAT_LIBS)
EXTRADLLFLAGS = -nodefaultlibs -Wl,--image-base,0x7bc00000 EXTRADLLFLAGS = -nodefaultlibs -Wl,--image-base,0x7bc00000
x86_64_EXTRADLLFLAGS = -nodefaultlibs -Wl,--image-base,0x170000000 x86_64_EXTRADLLFLAGS = -nodefaultlibs -Wl,--image-base,0x170000000
......
MODULE = openal32.dll MODULE = openal32.dll
EXTRALIBS = $(OPENAL_LIBS) UNIX_LIBS = $(OPENAL_LIBS)
EXTRADLLFLAGS = -Wb,--prefer-native -mcygwin EXTRADLLFLAGS = -Wb,--prefer-native -mcygwin
......
MODULE = opencl.dll MODULE = opencl.dll
UNIXLIB = opencl.so UNIXLIB = opencl.so
EXTRALIBS = $(OPENCL_LIBS) UNIX_LIBS = $(OPENCL_LIBS)
C_SRCS = \ C_SRCS = \
pe_thunks.c \ pe_thunks.c \
......
MODULE = sane.ds MODULE = sane.ds
UNIXLIB = sane.so UNIXLIB = sane.so
IMPORTS = comctl32 user32 gdi32 IMPORTS = comctl32 user32 gdi32
EXTRALIBS = $(SANE_LIBS) UNIX_LIBS = $(SANE_LIBS)
EXTRAINCL = $(SANE_CFLAGS) UNIX_CFLAGS = $(SANE_CFLAGS)
C_SRCS = \ C_SRCS = \
capability.c \ capability.c \
......
...@@ -3,7 +3,7 @@ IMPORTLIB = secur32 ...@@ -3,7 +3,7 @@ IMPORTLIB = secur32
UNIXLIB = secur32.so UNIXLIB = secur32.so
IMPORTS = advapi32 IMPORTS = advapi32
DELAYIMPORTS = crypt32 DELAYIMPORTS = crypt32
EXTRAINCL = $(GNUTLS_CFLAGS) UNIX_CFLAGS = $(GNUTLS_CFLAGS)
C_SRCS = \ C_SRCS = \
lsa.c \ lsa.c \
......
...@@ -2,9 +2,9 @@ EXTRADEFS = -DWINE_NO_LONG_TYPES ...@@ -2,9 +2,9 @@ EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = win32u.dll MODULE = win32u.dll
UNIXLIB = win32u.so UNIXLIB = win32u.so
IMPORTLIB = win32u IMPORTLIB = win32u
EXTRAINCL = $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS)
EXTRALIBS = $(CARBON_LIBS) $(APPKIT_LIBS) $(PTHREAD_LIBS) -lm
IMPORTS = ntdll winecrt0 IMPORTS = ntdll winecrt0
UNIX_CFLAGS = $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS)
UNIX_LIBS = $(CARBON_LIBS) $(APPKIT_LIBS) $(PTHREAD_LIBS) -lm
EXTRADLLFLAGS = -nodefaultlibs -Wb,--syscall-table,1 EXTRADLLFLAGS = -nodefaultlibs -Wb,--syscall-table,1
......
...@@ -2,7 +2,7 @@ MODULE = winealsa.drv ...@@ -2,7 +2,7 @@ MODULE = winealsa.drv
UNIXLIB = winealsa.so UNIXLIB = winealsa.so
IMPORTS = uuid ole32 advapi32 IMPORTS = uuid ole32 advapi32
DELAYIMPORTS = winmm DELAYIMPORTS = winmm
EXTRALIBS = $(ALSA_LIBS) $(PTHREAD_LIBS) UNIX_LIBS = $(ALSA_LIBS) $(PTHREAD_LIBS)
C_SRCS = \ C_SRCS = \
alsa.c \ alsa.c \
......
...@@ -2,7 +2,7 @@ EXTRADEFS = -DWINE_NO_LONG_TYPES ...@@ -2,7 +2,7 @@ EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = wineandroid.drv MODULE = wineandroid.drv
UNIXLIB = wineandroid.so UNIXLIB = wineandroid.so
IMPORTS = ntoskrnl IMPORTS = ntoskrnl
EXTRALIBS = -lwin32u $(PTHREAD_LIBS) UNIX_LIBS = -lwin32u $(PTHREAD_LIBS)
C_SRCS = \ C_SRCS = \
device.c \ device.c \
......
MODULE = winebus.sys MODULE = winebus.sys
UNIXLIB = winebus.so UNIXLIB = winebus.so
IMPORTS = ntoskrnl hidparse IMPORTS = ntoskrnl hidparse
EXTRALIBS = $(IOKIT_LIBS) $(UDEV_LIBS) $(PTHREAD_LIBS) $(INOTIFY_LIBS) UNIX_LIBS = $(IOKIT_LIBS) $(UDEV_LIBS) $(PTHREAD_LIBS) $(INOTIFY_LIBS)
EXTRAINCL = $(UDEV_CFLAGS) $(SDL2_CFLAGS) UNIX_CFLAGS = $(UDEV_CFLAGS) $(SDL2_CFLAGS)
EXTRADLLFLAGS = -Wl,--subsystem,native EXTRADLLFLAGS = -Wl,--subsystem,native
......
...@@ -2,7 +2,7 @@ MODULE = winecoreaudio.drv ...@@ -2,7 +2,7 @@ MODULE = winecoreaudio.drv
UNIXLIB = winecoreaudio.so UNIXLIB = winecoreaudio.so
IMPORTS = uuid ole32 user32 advapi32 IMPORTS = uuid ole32 user32 advapi32
DELAYIMPORTS = winmm DELAYIMPORTS = winmm
EXTRALIBS = $(COREAUDIO_LIBS) UNIX_LIBS = $(COREAUDIO_LIBS)
C_SRCS = \ C_SRCS = \
coreaudio.c \ coreaudio.c \
......
...@@ -3,8 +3,8 @@ UNIXLIB = winegstreamer.so ...@@ -3,8 +3,8 @@ UNIXLIB = winegstreamer.so
IMPORTLIB = winegstreamer IMPORTLIB = winegstreamer
IMPORTS = strmbase ole32 oleaut32 msdmo IMPORTS = strmbase ole32 oleaut32 msdmo
DELAYIMPORTS = mfplat DELAYIMPORTS = mfplat
EXTRAINCL = $(GSTREAMER_CFLAGS) UNIX_CFLAGS = $(GSTREAMER_CFLAGS)
EXTRALIBS = $(GSTREAMER_LIBS) $(PTHREAD_LIBS) UNIX_LIBS = $(GSTREAMER_LIBS) $(PTHREAD_LIBS)
C_SRCS = \ C_SRCS = \
color_convert.c \ color_convert.c \
......
...@@ -3,7 +3,7 @@ MODULE = winemac.drv ...@@ -3,7 +3,7 @@ MODULE = winemac.drv
UNIXLIB = winemac.so UNIXLIB = winemac.so
IMPORTS = uuid rpcrt4 user32 gdi32 win32u IMPORTS = uuid rpcrt4 user32 gdi32 win32u
DELAYIMPORTS = ole32 shell32 imm32 DELAYIMPORTS = ole32 shell32 imm32
EXTRALIBS = -lwin32u -framework AppKit -framework Carbon -framework Security -framework OpenGL -framework IOKit -framework CoreVideo -framework QuartzCore $(METAL_LIBS) UNIX_LIBS = -lwin32u -framework AppKit -framework Carbon -framework Security -framework OpenGL -framework IOKit -framework CoreVideo -framework QuartzCore $(METAL_LIBS)
C_SRCS = \ C_SRCS = \
clipboard.c \ clipboard.c \
......
...@@ -2,8 +2,8 @@ MODULE = wineoss.drv ...@@ -2,8 +2,8 @@ MODULE = wineoss.drv
UNIXLIB = wineoss.so UNIXLIB = wineoss.so
IMPORTS = uuid ole32 user32 advapi32 IMPORTS = uuid ole32 user32 advapi32
DELAYIMPORTS = winmm DELAYIMPORTS = winmm
EXTRALIBS = $(OSS4_LIBS) $(PTHREAD_LIBS) UNIX_LIBS = $(OSS4_LIBS) $(PTHREAD_LIBS)
EXTRAINCL = $(OSS4_CFLAGS) UNIX_CFLAGS = $(OSS4_CFLAGS)
C_SRCS = \ C_SRCS = \
midi.c \ midi.c \
......
MODULE = winepulse.drv MODULE = winepulse.drv
UNIXLIB = winepulse.so UNIXLIB = winepulse.so
IMPORTS = dxguid uuid winmm user32 advapi32 ole32 version IMPORTS = dxguid uuid winmm user32 advapi32 ole32 version
EXTRALIBS = $(PULSE_LIBS) $(PTHREAD_LIBS) -lm UNIX_LIBS = $(PULSE_LIBS) $(PTHREAD_LIBS) -lm
EXTRAINCL = $(PULSE_CFLAGS) UNIX_CFLAGS = $(PULSE_CFLAGS)
C_SRCS = \ C_SRCS = \
mmdevdrv.c \ mmdevdrv.c \
......
EXTRADEFS = -DWINE_NO_LONG_TYPES EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = wineusb.sys MODULE = wineusb.sys
IMPORTS = ntoskrnl IMPORTS = ntoskrnl
EXTRALIBS = $(USB_LIBS) UNIX_LIBS = $(USB_LIBS)
EXTRAINCL = $(USB_CFLAGS) UNIX_CFLAGS = $(USB_CFLAGS)
EXTRADLLFLAGS = -Wl,--subsystem,native -mcygwin EXTRADLLFLAGS = -Wl,--subsystem,native -mcygwin
......
...@@ -2,7 +2,7 @@ MODULE = winevulkan.dll ...@@ -2,7 +2,7 @@ MODULE = winevulkan.dll
UNIXLIB = winevulkan.so UNIXLIB = winevulkan.so
IMPORTLIB = winevulkan IMPORTLIB = winevulkan
IMPORTS = user32 gdi32 advapi32 setupapi win32u IMPORTS = user32 gdi32 advapi32 setupapi win32u
EXTRALIBS = $(PTHREAD_LIBS) UNIX_LIBS = $(PTHREAD_LIBS)
C_SRCS = \ C_SRCS = \
loader.c \ loader.c \
......
...@@ -3,8 +3,8 @@ MODULE = winex11.drv ...@@ -3,8 +3,8 @@ MODULE = winex11.drv
UNIXLIB = winex11.so UNIXLIB = winex11.so
IMPORTS = uuid user32 gdi32 win32u IMPORTS = uuid user32 gdi32 win32u
DELAYIMPORTS = comctl32 ole32 shell32 imm32 DELAYIMPORTS = comctl32 ole32 shell32 imm32
EXTRAINCL = $(X_CFLAGS) UNIX_CFLAGS = $(X_CFLAGS)
EXTRALIBS = -lwin32u $(X_LIBS) $(X_EXTRA_LIBS) $(PTHREAD_LIBS) -lm UNIX_LIBS = -lwin32u $(X_LIBS) $(X_EXTRA_LIBS) $(PTHREAD_LIBS) -lm
C_SRCS = \ C_SRCS = \
bitblt.c \ bitblt.c \
......
...@@ -2,8 +2,8 @@ MODULE = winspool.drv ...@@ -2,8 +2,8 @@ MODULE = winspool.drv
UNIXLIB = winspool.so UNIXLIB = winspool.so
IMPORTLIB = winspool IMPORTLIB = winspool
IMPORTS = user32 gdi32 advapi32 IMPORTS = user32 gdi32 advapi32
EXTRAINCL = $(CUPS_CFLAGS) UNIX_CFLAGS = $(CUPS_CFLAGS)
EXTRALIBS = $(APPLICATIONSERVICES_LIBS) UNIX_LIBS = $(APPLICATIONSERVICES_LIBS)
C_SRCS = \ C_SRCS = \
cups.c \ cups.c \
......
...@@ -2,8 +2,8 @@ MODULE = wldap32.dll ...@@ -2,8 +2,8 @@ MODULE = wldap32.dll
UNIXLIB = wldap32.so UNIXLIB = wldap32.so
IMPORTLIB = wldap32 IMPORTLIB = wldap32
IMPORTS = user32 IMPORTS = user32
EXTRAINCL = $(LDAP_CFLAGS) UNIX_CFLAGS = $(LDAP_CFLAGS)
EXTRALIBS = $(LDAP_LIBS) UNIX_LIBS = $(LDAP_LIBS)
C_SRCS = \ C_SRCS = \
add.c \ add.c \
......
...@@ -2,7 +2,7 @@ MODULE = wpcap.dll ...@@ -2,7 +2,7 @@ MODULE = wpcap.dll
UNIXLIB = wpcap.so UNIXLIB = wpcap.so
IMPORTS = iphlpapi IMPORTS = iphlpapi
DELAYIMPORTS = ws2_32 DELAYIMPORTS = ws2_32
EXTRALIBS = $(PCAP_LIBS) UNIX_LIBS = $(PCAP_LIBS)
C_SRCS = \ C_SRCS = \
unixlib.c \ unixlib.c \
......
EXTRALIBS = $(COREFOUNDATION_LIBS) $(CORESERVICES_LIBS) $(I386_LIBS) UNIX_LIBS = $(COREFOUNDATION_LIBS) $(CORESERVICES_LIBS) $(I386_LIBS)
C_SRCS = \ C_SRCS = \
c_037.c \ c_037.c \
......
...@@ -49,6 +49,6 @@ MANPAGES = \ ...@@ -49,6 +49,6 @@ MANPAGES = \
wineserver.fr.UTF-8.man.in \ wineserver.fr.UTF-8.man.in \
wineserver.man.in wineserver.man.in
EXTRALIBS = $(LDEXECFLAGS) $(RT_LIBS) $(INOTIFY_LIBS) $(PROCSTAT_LIBS) UNIX_LIBS = $(LDEXECFLAGS) $(RT_LIBS) $(INOTIFY_LIBS) $(PROCSTAT_LIBS)
unicode_EXTRADEFS = -DNLSDIR="\"${nlsdir}\"" -DBIN_TO_NLSDIR=\"`${MAKEDEP} -R ${bindir} ${nlsdir}`\" unicode_EXTRADEFS = -DNLSDIR="\"${nlsdir}\"" -DBIN_TO_NLSDIR=\"`${MAKEDEP} -R ${bindir} ${nlsdir}`\"
...@@ -172,6 +172,7 @@ struct makefile ...@@ -172,6 +172,7 @@ struct makefile
struct strarray include_paths; struct strarray include_paths;
struct strarray include_args; struct strarray include_args;
struct strarray define_args; struct strarray define_args;
struct strarray unix_cflags;
struct strarray programs; struct strarray programs;
struct strarray scripts; struct strarray scripts;
struct strarray imports; struct strarray imports;
...@@ -2046,7 +2047,7 @@ static struct strarray add_unix_libraries( const struct makefile *make, struct s ...@@ -2046,7 +2047,7 @@ static struct strarray add_unix_libraries( const struct makefile *make, struct s
unsigned int i, j; unsigned int i, j;
if (strcmp( make->unixlib, "ntdll.so" )) strarray_add( &all_libs, "-lntdll" ); if (strcmp( make->unixlib, "ntdll.so" )) strarray_add( &all_libs, "-lntdll" );
strarray_addall( &all_libs, get_expanded_make_var_array( make, "EXTRALIBS" )); strarray_addall( &all_libs, get_expanded_make_var_array( make, "UNIX_LIBS" ));
for (i = 0; i < all_libs.count; i++) for (i = 0; i < all_libs.count; i++)
{ {
...@@ -2277,9 +2278,11 @@ static struct strarray get_source_defines( struct makefile *make, struct incl_fi ...@@ -2277,9 +2278,11 @@ static struct strarray get_source_defines( struct makefile *make, struct incl_fi
strarray_addall( &ret, make->include_args ); strarray_addall( &ret, make->include_args );
if (source->use_msvcrt) if (source->use_msvcrt)
{
strarray_add( &ret, strmake( "-I%s", root_src_dir_path( "include/msvcrt" ))); strarray_add( &ret, strmake( "-I%s", root_src_dir_path( "include/msvcrt" )));
for (i = 0; i < make->include_paths.count; i++) for (i = 0; i < make->include_paths.count; i++)
strarray_add( &ret, strmake( "-I%s", make->include_paths.str[i] )); strarray_add( &ret, strmake( "-I%s", make->include_paths.str[i] ));
}
strarray_addall( &ret, make->define_args ); strarray_addall( &ret, make->define_args );
strarray_addall( &ret, get_expanded_file_local_var( make, obj, "EXTRADEFS" )); strarray_addall( &ret, get_expanded_file_local_var( make, obj, "EXTRADEFS" ));
if ((source->file->flags & FLAG_C_UNIX) && *dll_ext) strarray_add( &ret, "-DWINE_UNIX_LIB" ); if ((source->file->flags & FLAG_C_UNIX) && *dll_ext) strarray_add( &ret, "-DWINE_UNIX_LIB" );
...@@ -3004,6 +3007,7 @@ static void output_source_default( struct makefile *make, struct incl_file *sour ...@@ -3004,6 +3007,7 @@ static void output_source_default( struct makefile *make, struct incl_file *sour
output( "%s.o: %s\n", obj_dir_path( make, obj ), source->filename ); output( "%s.o: %s\n", obj_dir_path( make, obj ), source->filename );
output( "\t%s$(CC) -c -o $@ %s", cmd_prefix( "CC" ), source->filename ); output( "\t%s$(CC) -c -o $@ %s", cmd_prefix( "CC" ), source->filename );
output_filenames( defines ); output_filenames( defines );
if (!source->use_msvcrt) output_filenames( make->unix_cflags );
output_filenames( make->extlib ? extra_cflags_extlib : extra_cflags ); output_filenames( make->extlib ? extra_cflags_extlib : extra_cflags );
if (make->sharedlib || (source->file->flags & FLAG_C_UNIX)) if (make->sharedlib || (source->file->flags & FLAG_C_UNIX))
{ {
...@@ -3137,7 +3141,7 @@ static void output_module( struct makefile *make ) ...@@ -3137,7 +3141,7 @@ static void output_module( struct makefile *make )
if (!make->use_msvcrt) if (!make->use_msvcrt)
{ {
strarray_addall( &all_libs, get_expanded_make_var_array( make, "EXTRALIBS" )); strarray_addall( &all_libs, get_expanded_make_var_array( make, "UNIX_LIBS" ));
strarray_addall( &all_libs, libs ); strarray_addall( &all_libs, libs );
} }
...@@ -3298,7 +3302,7 @@ static void output_unix_lib( struct makefile *make ) ...@@ -3298,7 +3302,7 @@ static void output_unix_lib( struct makefile *make )
if (spec_file) strarray_add( &unix_deps, spec_file ); if (spec_file) strarray_add( &unix_deps, spec_file );
strarray_addall( &unix_libs, add_import_libs( make, &unix_deps, unix_imports, 0, 0 )); strarray_addall( &unix_libs, add_import_libs( make, &unix_deps, unix_imports, 0, 0 ));
strarray_addall( &unix_libs, get_expanded_make_var_array( make, "EXTRALIBS" )); strarray_addall( &unix_libs, get_expanded_make_var_array( make, "UNIX_LIBS" ));
strarray_addall( &unix_libs, libs ); strarray_addall( &unix_libs, libs );
} }
else unix_libs = add_unix_libraries( make, &unix_deps ); else unix_libs = add_unix_libraries( make, &unix_deps );
...@@ -3388,7 +3392,7 @@ static void output_shared_lib( struct makefile *make ) ...@@ -3388,7 +3392,7 @@ static void output_shared_lib( struct makefile *make )
strarray_addall( &dep_libs, get_local_dependencies( make, basename, make->in_files )); strarray_addall( &dep_libs, get_local_dependencies( make, basename, make->in_files ));
strarray_addall( &all_libs, get_expanded_file_local_var( make, basename, "LDFLAGS" )); strarray_addall( &all_libs, get_expanded_file_local_var( make, basename, "LDFLAGS" ));
strarray_addall( &all_libs, get_expanded_make_var_array( make, "EXTRALIBS" )); strarray_addall( &all_libs, get_expanded_make_var_array( make, "UNIX_LIBS" ));
strarray_addall( &all_libs, libs ); strarray_addall( &all_libs, libs );
output( "%s:", obj_dir_path( make, make->sharedlib )); output( "%s:", obj_dir_path( make, make->sharedlib ));
...@@ -3504,7 +3508,7 @@ static void output_programs( struct makefile *make ) ...@@ -3504,7 +3508,7 @@ static void output_programs( struct makefile *make )
if (!objs.count) objs = make->object_files; if (!objs.count) objs = make->object_files;
if (!strarray_exists( &all_libs, "-nodefaultlibs" )) if (!strarray_exists( &all_libs, "-nodefaultlibs" ))
{ {
strarray_addall( &all_libs, get_expanded_make_var_array( make, "EXTRALIBS" )); strarray_addall( &all_libs, get_expanded_make_var_array( make, "UNIX_LIBS" ));
strarray_addall( &all_libs, libs ); strarray_addall( &all_libs, libs );
} }
...@@ -4148,6 +4152,7 @@ static void load_sources( struct makefile *make ) ...@@ -4148,6 +4152,7 @@ static void load_sources( struct makefile *make )
make->include_paths = empty_strarray; make->include_paths = empty_strarray;
make->include_args = empty_strarray; make->include_args = empty_strarray;
make->define_args = empty_strarray; make->define_args = empty_strarray;
make->unix_cflags = empty_strarray;
if (!make->extlib) strarray_add( &make->define_args, "-D__WINESRC__" ); if (!make->extlib) strarray_add( &make->define_args, "-D__WINESRC__" );
value = get_expanded_make_var_array( make, "EXTRAINCL" ); value = get_expanded_make_var_array( make, "EXTRAINCL" );
...@@ -4167,6 +4172,7 @@ static void load_sources( struct makefile *make ) ...@@ -4167,6 +4172,7 @@ static void load_sources( struct makefile *make )
strarray_add_uniq( &make->define_args, value.str[i] ); strarray_add_uniq( &make->define_args, value.str[i] );
} }
strarray_addall( &make->define_args, get_expanded_make_var_array( make, "EXTRADEFS" )); strarray_addall( &make->define_args, get_expanded_make_var_array( make, "EXTRADEFS" ));
strarray_addall_uniq( &make->unix_cflags, get_expanded_make_var_array( make, "UNIX_CFLAGS" ));
strarray_add( &make->include_args, strmake( "-I%s", obj_dir_path( make, "" ))); strarray_add( &make->include_args, strmake( "-I%s", obj_dir_path( make, "" )));
if (make->src_dir) if (make->src_dir)
......
PROGRAMS = sfnt2fon PROGRAMS = sfnt2fon
UNIX_LIBS = $(FREETYPE_LIBS)
UNIX_CFLAGS = $(FREETYPE_CFLAGS)
C_SRCS = sfnt2fon.c C_SRCS = sfnt2fon.c
EXTRAINCL = $(FREETYPE_CFLAGS)
EXTRALIBS = $(FREETYPE_LIBS)
PROGRAMS = wmc PROGRAMS = wmc
MANPAGES = wmc.man.in MANPAGES = wmc.man.in
UNIX_LIBS = $(GETTEXTPO_LIBS)
C_SRCS = \ C_SRCS = \
lang.c \ lang.c \
...@@ -15,6 +16,4 @@ wmc_EXTRADEFS = \ ...@@ -15,6 +16,4 @@ wmc_EXTRADEFS = \
-DNLSDIR="\"${nlsdir}\"" \ -DNLSDIR="\"${nlsdir}\"" \
-DBIN_TO_NLSDIR=\"`${MAKEDEP} -R ${bindir} ${nlsdir}`\" -DBIN_TO_NLSDIR=\"`${MAKEDEP} -R ${bindir} ${nlsdir}`\"
EXTRALIBS = $(GETTEXTPO_LIBS)
INSTALL_DEV = $(PROGRAMS) INSTALL_DEV = $(PROGRAMS)
PROGRAMS = wrc PROGRAMS = wrc
EXTRALIBS = $(GETTEXTPO_LIBS) UNIX_LIBS = $(GETTEXTPO_LIBS)
C_SRCS = \ C_SRCS = \
genres.c \ genres.c \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment