Commit 6a9fe36d authored by Alexandre Julliard's avatar Alexandre Julliard

Created a separate static portability library and moved some of the

libwine routines in there.
parent ea8d2e21
...@@ -70,6 +70,7 @@ WIDL = $(TOOLSDIR)/tools/widl/widl ...@@ -70,6 +70,7 @@ WIDL = $(TOOLSDIR)/tools/widl/widl
WRCFLAGS = -J -m $(EXTRAWRCFLAGS) WRCFLAGS = -J -m $(EXTRAWRCFLAGS)
LDPATH = @LDPATH@ LDPATH = @LDPATH@
DLLDIR = $(TOPOBJDIR)/dlls DLLDIR = $(TOPOBJDIR)/dlls
LIBPORT = -L$(TOPOBJDIR)/libs/port -lwine_port
LIBWINE = -L$(TOPOBJDIR)/library -lwine LIBWINE = -L$(TOPOBJDIR)/library -lwine
LIBUNICODE = -L$(TOPOBJDIR)/unicode -lwine_unicode LIBUNICODE = -L$(TOPOBJDIR)/unicode -lwine_unicode
LIBUUID = -L$(TOPOBJDIR)/ole -lwine_uuid LIBUUID = -L$(TOPOBJDIR)/ole -lwine_uuid
......
...@@ -32,6 +32,7 @@ SUBDIRS = \ ...@@ -32,6 +32,7 @@ SUBDIRS = \
documentation \ documentation \
include \ include \
library \ library \
libs \
miscemu \ miscemu \
ole \ ole \
programs \ programs \
...@@ -55,7 +56,7 @@ INSTALLDEVSUBDIRS = \ ...@@ -55,7 +56,7 @@ INSTALLDEVSUBDIRS = \
tools tools
# Sub-directories to install for both install-lib and install-dev # Sub-directories to install for both install-lib and install-dev
INSTALLBOTHSUBDIRS = dlls INSTALLBOTHSUBDIRS = dlls libs
INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS) INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS)
...@@ -120,15 +121,16 @@ $(INSTALLBOTHSUBDIRS:%=%/__uninstall__): dummy ...@@ -120,15 +121,16 @@ $(INSTALLBOTHSUBDIRS:%=%/__uninstall__): dummy
# Dependencies between directories # Dependencies between directories
all: $(SUBDIRS) all: $(SUBDIRS)
dlls: library ole tools unicode dlls: library libs ole tools unicode
server: library tools unicode server: library libs tools unicode
miscemu programs: dlls library ole tools unicode miscemu programs: dlls library libs ole tools unicode
tools: library unicode tools: library libs unicode
dlls/__install-lib__ dlls/__install-dev__: library ole tools unicode dlls/__install-lib__ dlls/__install-dev__: library libs ole tools unicode
server/__install__: library tools unicode server/__install__: library libs tools unicode
miscemu/__install__ programs/__install__: library ole tools unicode dlls/__install-lib__ miscemu/__install__ programs/__install__: library libs ole tools unicode dlls/__install-lib__
library/__install__: library library/__install__: library
libs/__install__: libs
ole/__install__: ole ole/__install__: ole
tools/__install__: tools tools/__install__: tools
unicode/__install__: unicode unicode/__install__: unicode
......
...@@ -15691,7 +15691,7 @@ MAKE_TEST_RULES=dlls/Maketest.rules ...@@ -15691,7 +15691,7 @@ MAKE_TEST_RULES=dlls/Maketest.rules
MAKE_PROG_RULES=programs/Makeprog.rules MAKE_PROG_RULES=programs/Makeprog.rules
ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3dim/Makefile dlls/d3dx8/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput8/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/msvideo/msrle32/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winenas/Makefile dlls/winmm/winejack/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile miscemu/Makefile ole/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wpp/Makefile tools/wrc/Makefile unicode/Makefile" ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3dim/Makefile dlls/d3dx8/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput8/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/msvideo/msrle32/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winenas/Makefile dlls/winmm/winejack/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile libs/Makefile libs/port/Makefile miscemu/Makefile ole/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wpp/Makefile tools/wrc/Makefile unicode/Makefile"
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
...@@ -16349,6 +16349,8 @@ do ...@@ -16349,6 +16349,8 @@ do
"documentation/Makefile" ) CONFIG_FILES="$CONFIG_FILES documentation/Makefile" ;; "documentation/Makefile" ) CONFIG_FILES="$CONFIG_FILES documentation/Makefile" ;;
"include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
"library/Makefile" ) CONFIG_FILES="$CONFIG_FILES library/Makefile" ;; "library/Makefile" ) CONFIG_FILES="$CONFIG_FILES library/Makefile" ;;
"libs/Makefile" ) CONFIG_FILES="$CONFIG_FILES libs/Makefile" ;;
"libs/port/Makefile" ) CONFIG_FILES="$CONFIG_FILES libs/port/Makefile" ;;
"miscemu/Makefile" ) CONFIG_FILES="$CONFIG_FILES miscemu/Makefile" ;; "miscemu/Makefile" ) CONFIG_FILES="$CONFIG_FILES miscemu/Makefile" ;;
"ole/Makefile" ) CONFIG_FILES="$CONFIG_FILES ole/Makefile" ;; "ole/Makefile" ) CONFIG_FILES="$CONFIG_FILES ole/Makefile" ;;
"programs/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/Makefile" ;; "programs/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/Makefile" ;;
......
...@@ -1517,6 +1517,8 @@ dlls/x11drv/Makefile ...@@ -1517,6 +1517,8 @@ dlls/x11drv/Makefile
documentation/Makefile documentation/Makefile
include/Makefile include/Makefile
library/Makefile library/Makefile
libs/Makefile
libs/port/Makefile
miscemu/Makefile miscemu/Makefile
ole/Makefile ole/Makefile
programs/Makefile programs/Makefile
......
...@@ -16,7 +16,7 @@ MAINSPEC = $(MODULE:%.dll=%).spec ...@@ -16,7 +16,7 @@ MAINSPEC = $(MODULE:%.dll=%).spec
SPEC_DEF = $(MAINSPEC).def SPEC_DEF = $(MAINSPEC).def
WIN16_FILES = $(SPEC_SRCS:.spec=.spec.o) $(C_SRCS16:.c=.o) $(EXTRA_OBJS16) WIN16_FILES = $(SPEC_SRCS:.spec=.spec.o) $(C_SRCS16:.c=.o) $(EXTRA_OBJS16)
ALL_OBJS = @WIN16_FILES@ $(OBJS) $(MODULE).dbg.o ALL_OBJS = @WIN16_FILES@ $(OBJS) $(MODULE).dbg.o
ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBS) ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBPORT) $(LIBS)
IMPORTLIBS = $(DELAYIMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT)) $(IMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT)) IMPORTLIBS = $(DELAYIMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT)) $(IMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT))
all: $(MODULE)$(DLLEXT) $(SUBDIRS) all: $(MODULE)$(DLLEXT) $(SUBDIRS)
......
...@@ -21,7 +21,7 @@ RUNTESTFLAGS = -q -P wine -M $(TESTDLL) -T $(TOPOBJDIR) -p $(TESTPROGRAM) ...@@ -21,7 +21,7 @@ RUNTESTFLAGS = -q -P wine -M $(TESTDLL) -T $(TOPOBJDIR) -p $(TESTPROGRAM)
C_SRCS = $(CTESTS) C_SRCS = $(CTESTS)
EXTRA_SRCS = $(TESTLIST) EXTRA_SRCS = $(TESTLIST)
EXTRA_OBJS = $(TESTLIST:.c=.o) EXTRA_OBJS = $(TESTLIST:.c=.o)
ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBS) ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBPORT) $(LIBS)
IMPORTLIBS = $(DELAYIMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT)) $(IMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT)) IMPORTLIBS = $(DELAYIMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT)) $(IMPORTS:%=$(DLLDIR)/lib%.$(IMPLIBEXT))
CROSSTEST = $(TESTDLL:%.dll=%)_crosstest.exe CROSSTEST = $(TESTDLL:%.dll=%)_crosstest.exe
......
...@@ -64,88 +64,6 @@ ...@@ -64,88 +64,6 @@
# include <stdint.h> # include <stdint.h>
#endif #endif
/***********************************************************************
* usleep
*/
#ifndef HAVE_USLEEP
int usleep (unsigned int useconds)
{
#if defined(__EMX__)
DosSleep(useconds);
return 0;
#elif defined(__BEOS__)
return snooze(useconds);
#elif defined(HAVE_SELECT)
struct timeval delay;
delay.tv_sec = useconds / 1000000;
delay.tv_usec = useconds % 1000000;
select( 0, 0, 0, 0, &delay );
return 0;
#else /* defined(__EMX__) || defined(__BEOS__) || defined(HAVE_SELECT) */
errno = ENOSYS;
return -1;
#endif /* defined(__EMX__) || defined(__BEOS__) || defined(HAVE_SELECT) */
}
#endif /* HAVE_USLEEP */
/***********************************************************************
* memmove
*/
#ifndef HAVE_MEMMOVE
void *memmove( void *dest, const void *src, size_t len )
{
register char *dst = dest;
/* Use memcpy if not overlapping */
if ((dst + len <= (char *)src) || ((char *)src + len <= dst))
{
memcpy( dst, src, len );
}
/* Otherwise do it the hard way (FIXME: could do better than this) */
else if (dst < (char *)src)
{
while (len--) *dst++ = *((char *)src)++;
}
else
{
dst += len - 1;
src = (char *)src + len - 1;
while (len--) *dst-- = *((char *)src)--;
}
return dest;
}
#endif /* HAVE_MEMMOVE */
/***********************************************************************
* strerror
*/
#ifndef HAVE_STRERROR
const char *strerror( int err )
{
/* Let's hope we have sys_errlist then */
return sys_errlist[err];
}
#endif /* HAVE_STRERROR */
/***********************************************************************
* getpagesize
*/
#ifndef HAVE_GETPAGESIZE
size_t getpagesize(void)
{
# ifdef __svr4__
return sysconf(_SC_PAGESIZE);
# elif defined(__i386__)
return 4096;
# else
# error Cannot get the page size on this platform
# endif
}
#endif /* HAVE_GETPAGESIZE */
/*********************************************************************** /***********************************************************************
* clone * clone
...@@ -181,42 +99,6 @@ int clone( int (*fn)(void *), void *stack, int flags, void *arg ) ...@@ -181,42 +99,6 @@ int clone( int (*fn)(void *), void *stack, int flags, void *arg )
} }
#endif /* !HAVE_CLONE && __linux__ */ #endif /* !HAVE_CLONE && __linux__ */
/***********************************************************************
* strcasecmp
*/
#ifndef HAVE_STRCASECMP
int strcasecmp( const char *str1, const char *str2 )
{
const unsigned char *ustr1 = (const unsigned char *)str1;
const unsigned char *ustr2 = (const unsigned char *)str2;
while (*ustr1 && toupper(*ustr1) == toupper(*ustr2)) {
ustr1++;
ustr2++;
}
return toupper(*ustr1) - toupper(*ustr2);
}
#endif /* HAVE_STRCASECMP */
/***********************************************************************
* strncasecmp
*/
#ifndef HAVE_STRNCASECMP
int strncasecmp( const char *str1, const char *str2, size_t n )
{
const unsigned char *ustr1 = (const unsigned char *)str1;
const unsigned char *ustr2 = (const unsigned char *)str2;
int res;
if (!n) return 0;
while ((--n > 0) && *ustr1) {
if ((res = toupper(*ustr1) - toupper(*ustr2))) return res;
ustr1++;
ustr2++;
}
return toupper(*ustr1) - toupper(*ustr2);
}
#endif /* HAVE_STRNCASECMP */
/*********************************************************************** /***********************************************************************
* getsockopt * getsockopt
...@@ -241,134 +123,6 @@ unsigned long inet_network(const char *cp) ...@@ -241,134 +123,6 @@ unsigned long inet_network(const char *cp)
} }
#endif /* defined(HAVE_INET_NETWORK) */ #endif /* defined(HAVE_INET_NETWORK) */
/***********************************************************************
* statfs
*/
#ifndef HAVE_STATFS
int statfs(const char *name, struct statfs *info)
{
#ifdef __BEOS__
dev_t mydev;
fs_info fsinfo;
if(!info) {
errno = ENOSYS;
return -1;
}
if ((mydev = dev_for_path(name)) < 0) {
errno = ENOSYS;
return -1;
}
if (fs_stat_dev(mydev,&fsinfo) < 0) {
errno = ENOSYS;
return -1;
}
info->f_bsize = fsinfo.block_size;
info->f_blocks = fsinfo.total_blocks;
info->f_bfree = fsinfo.free_blocks;
return 0;
#else /* defined(__BEOS__) */
errno = ENOSYS;
return -1;
#endif /* defined(__BEOS__) */
}
#endif /* !defined(HAVE_STATFS) */
/***********************************************************************
* lstat
*/
#ifndef HAVE_LSTAT
int lstat(const char *file_name, struct stat *buf)
{
return stat( file_name, buf );
}
#endif /* HAVE_LSTAT */
/***********************************************************************
* mkstemp
*/
#ifndef HAVE_MKSTEMP
int mkstemp(char *tmpfn)
{
int tries;
char *xstart;
xstart = tmpfn+strlen(tmpfn)-1;
while ((xstart > tmpfn) && (*xstart == 'X'))
xstart--;
tries = 10;
while (tries--) {
char *newfn = mktemp(tmpfn);
int fd;
if (!newfn) /* something else broke horribly */
return -1;
fd = open(newfn,O_CREAT|O_RDWR|O_EXCL,0600);
if (fd!=-1)
return fd;
newfn = xstart;
/* fill up with X and try again ... */
while (*newfn) *newfn++ = 'X';
}
return -1;
}
#endif /* HAVE_MKSTEMP */
/***********************************************************************
* pread
*
* FIXME: this is not thread-safe
*/
#ifndef HAVE_PREAD
ssize_t pread( int fd, void *buf, size_t count, off_t offset )
{
ssize_t ret;
off_t old_pos;
if ((old_pos = lseek( fd, 0, SEEK_CUR )) == -1) return -1;
if (lseek( fd, offset, SEEK_SET ) == -1) return -1;
if ((ret = read( fd, buf, count )) == -1)
{
int err = errno; /* save errno */
lseek( fd, old_pos, SEEK_SET );
errno = err;
return -1;
}
if (lseek( fd, old_pos, SEEK_SET ) == -1) return -1;
return ret;
}
#endif /* HAVE_PREAD */
/***********************************************************************
* pwrite
*
* FIXME: this is not thread-safe
*/
#ifndef HAVE_PWRITE
ssize_t pwrite( int fd, const void *buf, size_t count, off_t offset )
{
ssize_t ret;
off_t old_pos;
if ((old_pos = lseek( fd, 0, SEEK_CUR )) == -1) return -1;
if (lseek( fd, offset, SEEK_SET ) == -1) return -1;
if ((ret = write( fd, buf, count )) == -1)
{
int err = errno; /* save errno */
lseek( fd, old_pos, SEEK_SET );
errno = err;
return -1;
}
if (lseek( fd, old_pos, SEEK_SET ) == -1) return -1;
return ret;
}
#endif /* HAVE_PWRITE */
#if defined(__svr4__) || defined(__NetBSD__) #if defined(__svr4__) || defined(__NetBSD__)
/*********************************************************************** /***********************************************************************
......
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = none
SUBDIRS = \
port
# Sub-directories to install for install-lib
INSTALLLIBSUBDIRS =
# Sub-directories to install for install-dev
INSTALLDEVSUBDIRS =
INSTALLSUBDIRS = $(INSTALLDEVSUBDIRS) $(INSTALLLIBSUBDIRS)
@MAKE_RULES@
all: $(SUBDIRS)
install-lib:: $(INSTALLLIBSUBDIRS:%=%/__install__)
install-dev:: $(INSTALLDEVSUBDIRS:%=%/__install__)
### Dependencies:
DEFS = @DLLFLAGS@ -D__WINESRC__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = libwine_port.a
C_SRCS = \
getpagesize.c \
lstat.c \
memmove.c \
mkstemp.c \
pread.c \
pwrite.c \
statfs.c \
strcasecmp.c \
strerror.c \
strncasecmp.c \
usleep.c
all: $(MODULE)
@MAKE_RULES@
$(MODULE): $(OBJS) Makefile.in
$(RM) $@
$(AR) $@ $(OBJS)
$(RANLIB) $@
### Dependencies:
/*
* getpagesize function
*
* Copyright 1996 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifndef HAVE_GETPAGESIZE
size_t getpagesize(void)
{
# ifdef __svr4__
return sysconf(_SC_PAGESIZE);
# elif defined(__i386__)
return 4096;
# else
# error Cannot get the page size on this platform
# endif
}
#endif /* HAVE_GETPAGESIZE */
/*
* lstat function
*
* Copyright 1996 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#ifndef HAVE_LSTAT
int lstat(const char *file_name, struct stat *buf)
{
return stat( file_name, buf );
}
#endif /* HAVE_LSTAT */
/*
* memmove function
*
* Copyright 1996 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#ifndef HAVE_MEMMOVE
void *memmove( void *dest, const void *src, size_t len )
{
register char *dst = dest;
/* Use memcpy if not overlapping */
if ((dst + len <= (char *)src) || ((char *)src + len <= dst))
{
memcpy( dst, src, len );
}
/* Otherwise do it the hard way (FIXME: could do better than this) */
else if (dst < (char *)src)
{
while (len--) *dst++ = *((char *)src)++;
}
else
{
dst += len - 1;
src = (char *)src + len - 1;
while (len--) *dst-- = *((char *)src)--;
}
return dest;
}
#endif /* HAVE_MEMMOVE */
/*
* mkstemp function
*
* Copyright 1996 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <fcntl.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifndef HAVE_MKSTEMP
int mkstemp(char *tmpfn)
{
int tries;
char *xstart;
xstart = tmpfn+strlen(tmpfn)-1;
while ((xstart > tmpfn) && (*xstart == 'X'))
xstart--;
tries = 10;
while (tries--)
{
char *newfn = mktemp(tmpfn);
int fd;
if (!newfn) /* something else broke horribly */
return -1;
fd = open(newfn,O_CREAT|O_RDWR|O_EXCL,0600);
if (fd!=-1)
return fd;
newfn = xstart;
/* fill up with X and try again ... */
while (*newfn) *newfn++ = 'X';
}
return -1;
}
#endif /* HAVE_MKSTEMP */
/*
* pread function
*
* Copyright 1996 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <errno.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
/* FIXME: this is not thread-safe */
#ifndef HAVE_PREAD
ssize_t pread( int fd, void *buf, size_t count, off_t offset )
{
ssize_t ret;
off_t old_pos;
if ((old_pos = lseek( fd, 0, SEEK_CUR )) == -1) return -1;
if (lseek( fd, offset, SEEK_SET ) == -1) return -1;
if ((ret = read( fd, buf, count )) == -1)
{
int err = errno; /* save errno */
lseek( fd, old_pos, SEEK_SET );
errno = err;
return -1;
}
if (lseek( fd, old_pos, SEEK_SET ) == -1) return -1;
return ret;
}
#endif /* HAVE_PREAD */
/*
* pwrite function
*
* Copyright 1996 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <errno.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
/* FIXME: this is not thread-safe */
#ifndef HAVE_PWRITE
ssize_t pwrite( int fd, const void *buf, size_t count, off_t offset )
{
ssize_t ret;
off_t old_pos;
if ((old_pos = lseek( fd, 0, SEEK_CUR )) == -1) return -1;
if (lseek( fd, offset, SEEK_SET ) == -1) return -1;
if ((ret = write( fd, buf, count )) == -1)
{
int err = errno; /* save errno */
lseek( fd, old_pos, SEEK_SET );
errno = err;
return -1;
}
if (lseek( fd, old_pos, SEEK_SET ) == -1) return -1;
return ret;
}
#endif /* HAVE_PWRITE */
/*
* statfs function
*
* Copyright 1996 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#ifdef __BEOS__
#include <be/kernel/fs_info.h>
#include <be/kernel/OS.h>
#endif
#include <errno.h>
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
#ifdef STATFS_DEFINED_BY_SYS_VFS
# include <sys/vfs.h>
#else
# ifdef STATFS_DEFINED_BY_SYS_MOUNT
# include <sys/mount.h>
# else
# ifdef STATFS_DEFINED_BY_SYS_STATFS
# include <sys/statfs.h>
# endif
# endif
#endif
#ifndef HAVE_STATFS
int statfs(const char *name, struct statfs *info)
{
#ifdef __BEOS__
dev_t mydev;
fs_info fsinfo;
if(!info) {
errno = ENOSYS;
return -1;
}
if ((mydev = dev_for_path(name)) < 0) {
errno = ENOSYS;
return -1;
}
if (fs_stat_dev(mydev,&fsinfo) < 0) {
errno = ENOSYS;
return -1;
}
info->f_bsize = fsinfo.block_size;
info->f_blocks = fsinfo.total_blocks;
info->f_bfree = fsinfo.free_blocks;
return 0;
#else /* defined(__BEOS__) */
errno = ENOSYS;
return -1;
#endif /* defined(__BEOS__) */
}
#endif /* !defined(HAVE_STATFS) */
/*
* strcasecmp function
*
* Copyright 1996 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <ctype.h>
#ifndef HAVE_STRCASECMP
int strcasecmp( const char *str1, const char *str2 )
{
const unsigned char *ustr1 = (const unsigned char *)str1;
const unsigned char *ustr2 = (const unsigned char *)str2;
while (*ustr1 && toupper(*ustr1) == toupper(*ustr2)) {
ustr1++;
ustr2++;
}
return toupper(*ustr1) - toupper(*ustr2);
}
#endif /* HAVE_STRCASECMP */
/*
* strerror function
*
* Copyright 1996 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#ifndef HAVE_STRERROR
const char *strerror( int err )
{
/* Let's hope we have sys_errlist then */
return sys_errlist[err];
}
#endif /* HAVE_STRERROR */
/*
* strncasecmp function
*
* Copyright 1996 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#include <ctype.h>
#ifndef HAVE_STRNCASECMP
int strncasecmp( const char *str1, const char *str2, size_t n )
{
const unsigned char *ustr1 = (const unsigned char *)str1;
const unsigned char *ustr2 = (const unsigned char *)str2;
int res;
if (!n) return 0;
while ((--n > 0) && *ustr1)
{
if ((res = toupper(*ustr1) - toupper(*ustr2))) return res;
ustr1++;
ustr2++;
}
return toupper(*ustr1) - toupper(*ustr2);
}
#endif /* HAVE_STRNCASECMP */
/*
* usleep function
*
* Copyright 1996 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#ifndef HAVE_USLEEP
int usleep (unsigned int useconds)
{
#if defined(__EMX__)
DosSleep(useconds);
return 0;
#elif defined(__BEOS__)
return snooze(useconds);
#elif defined(HAVE_SELECT)
struct timeval delay;
delay.tv_sec = useconds / 1000000;
delay.tv_usec = useconds % 1000000;
select( 0, 0, 0, 0, &delay );
return 0;
#else /* defined(__EMX__) || defined(__BEOS__) || defined(HAVE_SELECT) */
errno = ENOSYS;
return -1;
#endif /* defined(__EMX__) || defined(__BEOS__) || defined(HAVE_SELECT) */
}
#endif /* HAVE_USLEEP */
...@@ -18,7 +18,7 @@ all: $(MODULE) ...@@ -18,7 +18,7 @@ all: $(MODULE)
ALL_OBJS = $(SPEC_SRCS:.spec=.spec.o) $(OBJS) ALL_OBJS = $(SPEC_SRCS:.spec=.spec.o) $(OBJS)
$(MODULE): $(ALL_OBJS) $(MODULE): $(ALL_OBJS)
$(CC) -o $@ $(ALL_OBJS) -L$(DLLDIR) $(LDIMPORTS:%=-l%) $(LIBWINE) $(LIBUNICODE) $(LIBS) $(LDFLAGS) $(CC) -o $@ $(ALL_OBJS) -L$(DLLDIR) $(LDIMPORTS:%=-l%) $(LIBWINE) $(LIBUNICODE) $(LIBPORT) $(LIBS) $(LDFLAGS)
wine.spec.c: $(WINEBUILD) wine.spec.c: $(WINEBUILD)
$(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --exe wine -mgui -e wine_initial_task -L$(DLLDIR) $(IMPORTS:%=-l%) $(LDPATH) $(WINEBUILD) $(DEFS) -o $@ --exe wine -mgui -e wine_initial_task -L$(DLLDIR) $(IMPORTS:%=-l%)
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
DEFS = @DLLFLAGS@ $(EXTRADEFS) DEFS = @DLLFLAGS@ $(EXTRADEFS)
LDDLLFLAGS = @LDDLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@
ALL_OBJS = $(OBJS) $(MODULE).dbg.o ALL_OBJS = $(OBJS) $(MODULE).dbg.o
ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBS) ALL_LIBS = $(LIBWINE) $(EXTRALIBS) $(LIBPORT) $(LIBS)
BASEMODULE = $(MODULE:.exe=) BASEMODULE = $(MODULE:.exe=)
TESTIMPORTS = $(DELAYIMPORTS) $(IMPORTS) TESTIMPORTS = $(DELAYIMPORTS) $(IMPORTS)
RUNTESTFLAGS= -q -P wine -T $(TOPOBJDIR) $(PLTESTPROGRAM:%=-p %) RUNTESTFLAGS= -q -P wine -T $(TOPOBJDIR) $(PLTESTPROGRAM:%=-p %)
......
...@@ -6,7 +6,7 @@ SRCDIR = @srcdir@ ...@@ -6,7 +6,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = none MODULE = none
PROGRAMS = aviinfo.exe aviplay.exe icinfo.exe PROGRAMS = aviinfo.exe aviplay.exe icinfo.exe
ALL_LIBS = $(LIBWINE) $(LIBS) ALL_LIBS = $(LIBWINE) $(LIBPORT) $(LIBS)
C_SRCS = \ C_SRCS = \
aviinfo.c \ aviinfo.c \
......
...@@ -50,7 +50,7 @@ all: $(PROGRAMS) ...@@ -50,7 +50,7 @@ all: $(PROGRAMS)
@MAKE_RULES@ @MAKE_RULES@
wineserver: $(OBJS) wineserver: $(OBJS)
$(CC) -o $(PROGRAMS) $(OBJS) $(LIBWINE) $(LIBUNICODE) $(LIBS) $(LDFLAGS) $(CC) -o $(PROGRAMS) $(OBJS) $(LIBUNICODE) $(LIBPORT) $(LIBS) $(LDFLAGS)
install:: $(PROGRAMS) install:: $(PROGRAMS)
$(MKINSTALLDIRS) $(bindir) $(MKINSTALLDIRS) $(bindir)
......
DEFS = -DNO_LIBWINE -DLEX_OUTPUT_ROOT="\"@LEX_OUTPUT_ROOT@\"" -DINCLUDEDIR="\"$(includedir)\"" -DBINDIR="\"$(bindir)\"" DEFS = -DLEX_OUTPUT_ROOT="\"@LEX_OUTPUT_ROOT@\"" -DINCLUDEDIR="\"$(includedir)\"" -DBINDIR="\"$(bindir)\""
TOPSRCDIR = @top_srcdir@ TOPSRCDIR = @top_srcdir@
TOPOBJDIR = .. TOPOBJDIR = ..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = none MODULE = none
PROGRAMS = \ PROGRAMS = \
bin2res \ bin2res \
...@@ -40,19 +40,19 @@ all: $(PROGRAMS) $(SUBDIRS) ...@@ -40,19 +40,19 @@ all: $(PROGRAMS) $(SUBDIRS)
widl wrc: wpp widl wrc: wpp
makedep: makedep.o makedep: makedep.o
$(CC) $(CFLAGS) -o makedep makedep.o $(CC) $(CFLAGS) -o makedep makedep.o $(LIBPORT)
fnt2bdf: fnt2bdf.o fnt2bdf: fnt2bdf.o
$(CC) $(CFLAGS) -o fnt2bdf fnt2bdf.o $(CC) $(CFLAGS) -o fnt2bdf fnt2bdf.o $(LIBPORT)
bin2res: bin2res.o bin2res: bin2res.o
$(CC) $(CFLAGS) -o bin2res bin2res.o $(CC) $(CFLAGS) -o bin2res bin2res.o $(LIBPORT)
winegcc: winegcc.o winegcc: winegcc.o
$(CC) $(CFLAGS) -o winegcc winegcc.o $(CC) $(CFLAGS) -o winegcc winegcc.o $(LIBPORT)
winewrap: winewrap.o winewrap: winewrap.o
$(CC) $(CFLAGS) -o winewrap winewrap.o $(CC) $(CFLAGS) -o winewrap winewrap.o $(LIBPORT)
install:: install::
$(MKINSTALLDIRS) $(bindir) $(mandir)/man$(prog_manext) $(MKINSTALLDIRS) $(bindir) $(mandir)/man$(prog_manext)
......
...@@ -23,11 +23,8 @@ all: $(PROGRAMS) ...@@ -23,11 +23,8 @@ all: $(PROGRAMS)
@MAKE_RULES@ @MAKE_RULES@
widl: $(OBJS) $(TOPOBJDIR)/tools/wpp/libwpp.a widl$(EXEEXT): $(OBJS) $(TOPOBJDIR)/tools/wpp/libwpp.a
$(CC) $(CFLAGS) -o widl $(OBJS) $(EXTRALIBS) $(LIBWINE) $(LIBUNICODE) $(LEXLIB) $(LDFLAGS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(LIBPORT) $(LEXLIB) $(LDFLAGS)
widl.exe: $(OBJS) $(TOPOBJDIR)/tools/wpp/libwpp.a
$(CC) $(CFLAGS) -o widl.exe $(OBJS) $(EXTRALIBS) $(LIBWINE) $(LIBUNICODE) $(LEXLIB) -liberty $(LDFLAGS)
y.tab.c y.tab.h: parser.y y.tab.c y.tab.h: parser.y
$(YACC) $(YACCOPT) -d -t $(SRCDIR)/parser.y $(YACC) $(YACCOPT) -d -t $(SRCDIR)/parser.y
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
#include "wine/unicode.h"
#include "widl.h" #include "widl.h"
#include "utils.h" #include "utils.h"
#include "parser.h" #include "parser.h"
......
...@@ -23,7 +23,7 @@ all: $(PROGRAMS) winebuild.man ...@@ -23,7 +23,7 @@ all: $(PROGRAMS) winebuild.man
@MAKE_RULES@ @MAKE_RULES@
winebuild$(EXEEXT): $(OBJS) winebuild$(EXEEXT): $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBWINE) $(LIBUNICODE) $(LDFLAGS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBUNICODE) $(LIBPORT) $(LDFLAGS)
winebuild.man: winebuild.man.in winebuild.man: winebuild.man.in
sed -e 's,@PACKAGE_STRING\@,@PACKAGE_STRING@,g' $(SRCDIR)/winebuild.man.in >$@ || $(RM) $@ sed -e 's,@PACKAGE_STRING\@,@PACKAGE_STRING@,g' $(SRCDIR)/winebuild.man.in >$@ || $(RM) $@
......
...@@ -22,7 +22,7 @@ all: $(PROGRAMS) ...@@ -22,7 +22,7 @@ all: $(PROGRAMS)
@MAKE_RULES@ @MAKE_RULES@
winedump: $(OBJS) winedump: $(OBJS)
$(CC) $(CFLAGS) -o winedump $(OBJS) $(LIBWINE) $(LDFLAGS) $(CC) $(CFLAGS) -o winedump $(OBJS) $(LIBPORT) $(LDFLAGS)
install:: $(PROGRAMS) install:: $(PROGRAMS)
$(MKINSTALLDIRS) $(bindir) $(MKINSTALLDIRS) $(bindir)
......
...@@ -24,11 +24,8 @@ mcl.o: y.tab.h ...@@ -24,11 +24,8 @@ mcl.o: y.tab.h
@MAKE_RULES@ @MAKE_RULES@
wmc: $(OBJS) wmc$(EXEEXT): $(OBJS)
$(CC) $(CFLAGS) -o wmc $(OBJS) $(LIBWINE) $(LIBUNICODE) $(LEXLIB) $(LDFLAGS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBUNICODE) $(LIBPORT) $(LEXLIB) $(LDFLAGS)
wmc.exe: $(OBJS)
$(CC) $(CFLAGS) -o wmc.exe $(OBJS) $(LIBWINE) $(LIBUNICODE) $(LEXLIB) -liberty $(LDFLAGS)
y.tab.c y.tab.h: mcy.y y.tab.c y.tab.h: mcy.y
$(YACC) $(YACCOPT) -d -t $(SRCDIR)/mcy.y $(YACC) $(YACCOPT) -d -t $(SRCDIR)/mcy.y
......
...@@ -27,11 +27,8 @@ all: $(PROGRAMS) ...@@ -27,11 +27,8 @@ all: $(PROGRAMS)
@MAKE_RULES@ @MAKE_RULES@
wrc: $(OBJS) $(TOPOBJDIR)/tools/wpp/libwpp.a wrc$(EXEEXT): $(OBJS) $(TOPOBJDIR)/tools/wpp/libwpp.a
$(CC) $(CFLAGS) -o wrc $(OBJS) $(EXTRALIBS) $(LIBWINE) $(LIBUNICODE) $(LEXLIB) $(LDFLAGS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(LIBUNICODE) $(LIBPORT) $(LEXLIB) $(LDFLAGS)
wrc.exe: $(OBJS) $(TOPOBJDIR)/tools/wpp/libwpp.a
$(CC) $(CFLAGS) -o wrc.exe $(OBJS) $(EXTRALIBS) $(LIBWINE) $(LIBUNICODE) $(LEXLIB) -liberty $(LDFLAGS)
y.tab.c y.tab.h: parser.y y.tab.c y.tab.h: parser.y
$(YACC) $(YACCOPT) -d -t $(SRCDIR)/parser.y $(YACC) $(YACCOPT) -d -t $(SRCDIR)/parser.y
......
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