Implement Server #1
7
Makefile
7
Makefile
@ -3,6 +3,7 @@
|
||||
CFLAGS = -std=c99 -Iinclude -pedantic
|
||||
WARNINGS= -Wall -Wextra
|
||||
LDFLAGS = -fPIC -shared
|
||||
MACROS= -D_POSIX_C_SOURCE=1
|
||||
|
||||
TARGET = libflint.so
|
||||
SRC != ls src/*.c
|
||||
@ -11,10 +12,15 @@ OBJ = $(SRC:./src/$.c=./obj/%.o)
|
||||
PREFIX = $(DESTDIR)/usr/local
|
||||
LIBDIR = $(PREFIX)/lib
|
||||
|
||||
OS_NAME != uname -s | tr A-Z a-z
|
||||
|
||||
all: $(TARGET)
|
||||
./clanggen.sh
|
||||
|
||||
$(TARGET): $(OBJ)
|
||||
ifeq ($(OS_NAME),"openbsd")
|
||||
@echo "Building for openbsd"
|
||||
endif
|
||||
cc $(CFLAGS) $(WARNINGS) $(LDFLAGS) -o $(TARGET) $(OBJ)
|
||||
|
||||
./obj/%.o: ./src/%.c
|
||||
@ -40,3 +46,4 @@ tests:
|
||||
|
||||
manual:
|
||||
cc $(CFLAGS) -o netmanual tests/netmanual.c src/*.c
|
||||
|
||||
|
@ -1,8 +1,3 @@
|
||||
// Needed for sigaction on Linux
|
||||
#ifdef __linux__
|
||||
#define _POSIX_C_SOURCE 1
|
||||
#endif // __linux__
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user