Skip to content

Commit

Permalink
Merge pull request #320 from endofexclusive/pr/freebsd-misc
Browse files Browse the repository at this point in the history
Make simavr build on Freebsd
  • Loading branch information
buserror committed Feb 25, 2019
2 parents 719f4fd + 082939e commit d08f42a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/Makefile.opengl
Expand Up @@ -11,12 +11,13 @@ else
ifeq (${shell uname -o}, Msys)
LDFLAGS += -mwindows -lopengl32 -lfreeglut
else
CPPFLAGS += ${shell pkg-config --cflags glu glut} -DFREEBSD=1
LDFLAGS += ${shell pkg-config --libs glu glut}
CPPFLAGS += ${shell pkg-config --cflags glu}
LDFLAGS += ${shell pkg-config --libs glu} -lglut
endif
endif
endif

ifeq (${UNAME}, FreeBSD)
CPPFLAGS += -DFREEBSD=1 -DNO_ALLOCA=1
CPPFLAGS += -DNO_ALLOCA=1
CPPFLAGS += -I/usr/local/include
endif
1 change: 1 addition & 0 deletions examples/parts/Makefile
Expand Up @@ -25,6 +25,7 @@ target := libsimavrparts
all: obj ${target}

include ${simavr}/Makefile.common
include ../Makefile.opengl

objects := $(patsubst %.c,${OBJ}/%.o, $(wildcard *.c))

Expand Down
5 changes: 5 additions & 0 deletions examples/parts/uart_pty.c
Expand Up @@ -29,6 +29,11 @@
#include <signal.h>
#ifdef __APPLE__
#include <util.h>
#elif defined (__FreeBSD__)
#include <sys/types.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <libutil.h>
#else
#include <pty.h>
#endif
Expand Down
1 change: 1 addition & 0 deletions simavr/sim/sim_avr.c
Expand Up @@ -25,6 +25,7 @@
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <sys/time.h>
#include "sim_avr.h"
#include "sim_core.h"
#include "sim_time.h"
Expand Down

0 comments on commit d08f42a

Please sign in to comment.