mirror of
https://github.com/lammertb/libhttp.git
synced 2025-09-03 01:21:16 +03:00
moved linux-specific compilation #defines into mongoose.c. This way we make sure flags are picked up if Makefile is not used.
This commit is contained in:
15
Makefile
15
Makefile
@@ -23,8 +23,7 @@ all:
|
|||||||
|
|
||||||
CFLAGS= -W -Wall -std=c99 -pedantic -Os -fomit-frame-pointer $(COPT)
|
CFLAGS= -W -Wall -std=c99 -pedantic -Os -fomit-frame-pointer $(COPT)
|
||||||
MAC_SHARED= -flat_namespace -bundle -undefined suppress
|
MAC_SHARED= -flat_namespace -bundle -undefined suppress
|
||||||
LINFLAGS= -D_POSIX_SOURCE -D_BSD_SOURCE -D_FILE_OFFSET_BITS=64 \
|
LINFLAGS= -ldl -pthread $(CFLAGS)
|
||||||
-D_LARGEFILE_SOURCE -ldl -lpthread $(CFLAGS)
|
|
||||||
LIB= _$(PROG).so
|
LIB= _$(PROG).so
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
@@ -32,17 +31,17 @@ linux:
|
|||||||
$(CC) $(LINFLAGS) mongoose.c main.c -s -o $(PROG)
|
$(CC) $(LINFLAGS) mongoose.c main.c -s -o $(PROG)
|
||||||
|
|
||||||
bsd:
|
bsd:
|
||||||
$(CC) $(CFLAGS) mongoose.c -shared -lpthread -s -fpic -fPIC -o $(LIB)
|
$(CC) $(CFLAGS) mongoose.c -shared -pthread -s -fpic -fPIC -o $(LIB)
|
||||||
$(CC) $(CFLAGS) mongoose.c main.c -lpthread -s -o $(PROG)
|
$(CC) $(CFLAGS) mongoose.c main.c -pthread -s -o $(PROG)
|
||||||
|
|
||||||
mac:
|
mac:
|
||||||
$(CC) $(CFLAGS) $(MAC_SHARED) mongoose.c -lpthread -o $(LIB)
|
$(CC) $(CFLAGS) $(MAC_SHARED) mongoose.c -pthread -o $(LIB)
|
||||||
$(CC) $(CFLAGS) mongoose.c main.c -lpthread -o $(PROG)
|
$(CC) $(CFLAGS) mongoose.c main.c -pthread -o $(PROG)
|
||||||
|
|
||||||
solaris:
|
solaris:
|
||||||
gcc $(CFLAGS) mongoose.c -lpthread -lnsl \
|
gcc $(CFLAGS) mongoose.c -pthread -lnsl \
|
||||||
-lsocket -s -fpic -fPIC -shared -o $(LIB)
|
-lsocket -s -fpic -fPIC -shared -o $(LIB)
|
||||||
gcc $(CFLAGS) mongoose.c main.c -lpthread -lnsl -lsocket -s -o $(PROG)
|
gcc $(CFLAGS) mongoose.c main.c -pthread -lnsl -lsocket -s -o $(PROG)
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
@@ -25,7 +25,10 @@
|
|||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#define _CRT_SECURE_NO_WARNINGS /* Disable deprecation warning in VS2005 */
|
#define _CRT_SECURE_NO_WARNINGS /* Disable deprecation warning in VS2005 */
|
||||||
#endif /* _WIN32 */
|
#else
|
||||||
|
#define _XOPEN_SOURCE 600 /* Needed for pthread_rwlock on linux */
|
||||||
|
#define _LARGEFILE_SOURCE /* Enable 64-bit file offsets */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _WIN32_WCE /* Some ANSI #includes are not available on Windows CE */
|
#ifndef _WIN32_WCE /* Some ANSI #includes are not available on Windows CE */
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
Reference in New Issue
Block a user