This commit is contained in:
Andrew Pamment 2017-10-18 07:37:40 +10:00
commit 1a2048f41b
6 changed files with 58 additions and 41 deletions

View File

@ -1,5 +1,8 @@
OS := $(shell uname -s)
ifeq ($(OS), DragonFly)
MAKEFILE=Makefile.freebsd
endif
ifeq ($(OS), FreeBSD)
MAKEFILE=Makefile.freebsd
endif

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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