midway
This commit is contained in:
parent
9720e0ce98
commit
8d67851767
7
Makefile
7
Makefile
|
@ -3,6 +3,7 @@
|
||||||
CFLAGS = -std=c99 -Iinclude -pedantic
|
CFLAGS = -std=c99 -Iinclude -pedantic
|
||||||
WARNINGS= -Wall -Wextra
|
WARNINGS= -Wall -Wextra
|
||||||
LDFLAGS = -fPIC -shared
|
LDFLAGS = -fPIC -shared
|
||||||
|
MACROS= -D_POSIX_C_SOURCE=1
|
||||||
|
|
||||||
TARGET = libflint.so
|
TARGET = libflint.so
|
||||||
SRC != ls src/*.c
|
SRC != ls src/*.c
|
||||||
|
@ -11,10 +12,15 @@ OBJ = $(SRC:./src/$.c=./obj/%.o)
|
||||||
PREFIX = $(DESTDIR)/usr/local
|
PREFIX = $(DESTDIR)/usr/local
|
||||||
LIBDIR = $(PREFIX)/lib
|
LIBDIR = $(PREFIX)/lib
|
||||||
|
|
||||||
|
OS_NAME != uname -s | tr A-Z a-z
|
||||||
|
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
./clanggen.sh
|
./clanggen.sh
|
||||||
|
|
||||||
$(TARGET): $(OBJ)
|
$(TARGET): $(OBJ)
|
||||||
|
ifeq ($(OS_NAME),"openbsd")
|
||||||
|
@echo "Building for openbsd"
|
||||||
|
endif
|
||||||
cc $(CFLAGS) $(WARNINGS) $(LDFLAGS) -o $(TARGET) $(OBJ)
|
cc $(CFLAGS) $(WARNINGS) $(LDFLAGS) -o $(TARGET) $(OBJ)
|
||||||
|
|
||||||
./obj/%.o: ./src/%.c
|
./obj/%.o: ./src/%.c
|
||||||
|
@ -40,3 +46,4 @@ tests:
|
||||||
|
|
||||||
manual:
|
manual:
|
||||||
cc $(CFLAGS) -o netmanual tests/netmanual.c src/*.c
|
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 <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
Loading…
Reference in New Issue