DragonFly BSD support
This commit is contained in:
parent
1b0c1a6906
commit
87601156c6
3
Makefile
3
Makefile
@ -1,5 +1,8 @@
|
||||
OS := $(shell uname -s)
|
||||
|
||||
ifeq ($(OS), DragonFly)
|
||||
MAKEFILE=Makefile.freebsd
|
||||
endif
|
||||
ifeq ($(OS), FreeBSD)
|
||||
MAKEFILE=Makefile.freebsd
|
||||
endif
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <b64/cdecode.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#ifdef __FreeBSD__
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#include "bbs.h"
|
||||
|
@ -5,6 +5,11 @@ ifeq ($(OS), FreeBSD)
|
||||
CFLAGS=-I/usr/local/include
|
||||
LDFLAGS=-L/usr/local/lib
|
||||
endif
|
||||
ifeq ($(OS), DragonFly)
|
||||
CC=cc
|
||||
CFLAGS=-I/usr/local/include -I/usr/local/include/ncurses
|
||||
LDFLAGS=-L/usr/local/lib
|
||||
endif
|
||||
ifeq ($(OS), NetBSD)
|
||||
CC=cc
|
||||
CFLAGS=-I/usr/pkg/include
|
||||
@ -23,7 +28,6 @@ endif
|
||||
|
||||
|
||||
CC=cc
|
||||
CFLAGS=-I/usr/local/include
|
||||
DEPS = fileapprove.c
|
||||
|
||||
OBJ = fileapprove.o
|
||||
|
@ -5,6 +5,11 @@ ifeq ($(OS), FreeBSD)
|
||||
CFLAGS=-I/usr/local/include
|
||||
LDFLAGS=-L/usr/local/lib
|
||||
endif
|
||||
ifeq ($(OS), DragonFly)
|
||||
CC=cc
|
||||
CFLAGS=-I/usr/local/include
|
||||
LDFLAGS=-L/usr/local/lib
|
||||
endif
|
||||
ifeq ($(OS), NetBSD)
|
||||
CC=cc
|
||||
CFLAGS=-I/usr/pkg/include
|
||||
|
@ -40,7 +40,7 @@ MBOBJS = $(MBOBJS_MSG) $(MBOBJS_JAM) $(MBOBJS_SQ3)
|
||||
DEFS = $(PLATFORMDEF) $(MBDEFS) $(NLDEFS)
|
||||
|
||||
# Commands
|
||||
ifeq ($(OS), FreeBSD)
|
||||
ifeq ($(OS), $(filter $(OS), FreeBSD DragonFly))
|
||||
CC = cc $(CPPFLAGS) $(CFLAGS) $(DEFS) $(LDFLAGS) -L/usr/local/lib -I $(INCDIR) -I ../../../deps/ -I/usr/local/include -Wall
|
||||
else
|
||||
CC = gcc $(CPPFLAGS) $(CFLAGS) $(DEFS) $(LDFLAGS) -I $(INCDIR) -I ../../../deps/ -Wall
|
||||
|
@ -1,38 +1,43 @@
|
||||
OS := $(shell uname -s)
|
||||
|
||||
ifeq ($(OS), FreeBSD)
|
||||
CC=cc
|
||||
CFLAGS=-I/usr/local/include
|
||||
LDFLAGS=-L/usr/local/lib
|
||||
endif
|
||||
ifeq ($(OS), NetBSD)
|
||||
CC=cc
|
||||
CFLAGS=-I/usr/pkg/include
|
||||
LDFLAGS=-R/usr/pkg/lib -L/usr/pkg/lib
|
||||
endif
|
||||
ifeq ($(OS), Linux)
|
||||
CC=gcc
|
||||
CFLAGS=
|
||||
LDFLAGS=
|
||||
endif
|
||||
ifeq ($(OS), Darwin)
|
||||
CC=cc
|
||||
CFLAGS=
|
||||
LDFLAGS=
|
||||
endif
|
||||
|
||||
|
||||
DEPS = ticproc.c
|
||||
|
||||
OBJ = ticproc.o ../../src/inih/ini.o crc32.o
|
||||
%.o: %.c $(DEPS)
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
|
||||
ticproc: $(OBJ)
|
||||
$(CC) -o ticproc $^ $(CFLAGS) $(LDFLAGS) -lsqlite3
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) ticproc
|
||||
OS := $(shell uname -s)
|
||||
|
||||
ifeq ($(OS), FreeBSD)
|
||||
CC=cc
|
||||
CFLAGS=-I/usr/local/include
|
||||
LDFLAGS=-L/usr/local/lib
|
||||
endif
|
||||
ifeq ($(OS), DragonFly)
|
||||
CC=cc
|
||||
CFLAGS=-I/usr/local/include
|
||||
LDFLAGS=-L/usr/local/lib
|
||||
endif
|
||||
ifeq ($(OS), NetBSD)
|
||||
CC=cc
|
||||
CFLAGS=-I/usr/pkg/include
|
||||
LDFLAGS=-R/usr/pkg/lib -L/usr/pkg/lib
|
||||
endif
|
||||
ifeq ($(OS), Linux)
|
||||
CC=gcc
|
||||
CFLAGS=
|
||||
LDFLAGS=
|
||||
endif
|
||||
ifeq ($(OS), Darwin)
|
||||
CC=cc
|
||||
CFLAGS=
|
||||
LDFLAGS=
|
||||
endif
|
||||
|
||||
|
||||
DEPS = ticproc.c
|
||||
|
||||
OBJ = ticproc.o ../../src/inih/ini.o crc32.o
|
||||
%.o: %.c $(DEPS)
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
|
||||
ticproc: $(OBJ)
|
||||
$(CC) -o ticproc $^ $(CFLAGS) $(LDFLAGS) -lsqlite3
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) ticproc
|
||||
|
Reference in New Issue
Block a user