AVR_ROOT := "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/"
AVR_INC := ${AVR_ROOT}/avr-4/
AVR := ${AVR_ROOT}/bin/avr-
+LFLAGS += -L/opt/local/lib
else
AVR_ROOT := /usr/lib/avr
AVR_INC := ${AVR_ROOT}
VPATH = .
VPATH += ../parts
-LDFLAGS += -lglut -lpthread
+LDFLAGS += -lpthread
+ifneq (${shell uname}, Darwin)
+LDFLAGS += -lglut
+else
+LDFLAGS += -framework GLUT -framework OpenGL
+endif
all: obj ${firmware} ${board}
${board} : ${OBJ}/button.o
${board} : ${OBJ}/${board}.o
@echo LD $@
- @gcc -MD ${CFLAGS} -o $@ $^ $(LDFLAGS) ${simavr}/simavr/libsimavr.a
+ @gcc -MD ${CFLAGS} ${LFLAGS} -o $@ $^ $(LDFLAGS) ${simavr}/simavr/libsimavr.a
clean:
rm -rf obj *.hex *.a *.axf ${board} *.vcd
#include <stdlib.h>
#include <stdio.h>
#include <libgen.h>
-
+#if __APPLE__
+#include <GLUT/glut.h>
+#else
#include <GL/glut.h>
+#endif
#include <pthread.h>
#include "sim_avr.h"
VPATH = .
VPATH += ../parts
-LDFLAGS += -lglut -lpthread
+LDFLAGS += -lpthread
+ifneq (${shell uname}, Darwin)
+LDFLAGS += -lglut
+else
+LDFLAGS += -framework GLUT -framework OpenGL
+endif
all: obj ${firmware} ${board}
${board} : ${OBJ}/uart_udp.o
${board} : ${OBJ}/${board}.o
@echo LD $@
- @gcc -MD ${CFLAGS} -o $@ $^ $(LDFLAGS) ${simavr}/simavr/libsimavr.a
+ @gcc -MD ${CFLAGS} ${LFLAGS} -o $@ $^ $(LDFLAGS) ${simavr}/simavr/libsimavr.a
clean:
rm -rf obj *.a *.axf ${board} *.vcd
#include <stdio.h>
#include <libgen.h>
+#if __APPLE__
+#include <GLUT/glut.h>
+#else
#include <GL/glut.h>
+#endif
#include <pthread.h>
#include "sim_avr.h"
VPATH = .
VPATH += ../parts
-LDFLAGS += -lglut -lpthread
+LDFLAGS += -lpthread
+ifneq (${shell uname}, Darwin)
+LDFLAGS += -lglut
+else
+LDFLAGS += -framework GLUT -framework OpenGL
+endif
all: obj ${firmware} ${board}
${board} : ${OBJ}/hc595.o
${board} : ${OBJ}/${board}.o
@echo LD $@
- @gcc -MD ${CFLAGS} -o $@ $^ $(LDFLAGS) ${simavr}/simavr/libsimavr.a
+ @gcc -MD ${CFLAGS} ${LFLAGS} -o $@ $^ $(LDFLAGS) ${simavr}/simavr/libsimavr.a
clean:
rm -rf obj *.hex *.a *.axf ${board} *.vcd
#include <stdlib.h>
#include <stdio.h>
#include <libgen.h>
-
+#if __APPLE__
+#include <GLUT/glut.h>
+#else
#include <GL/glut.h>
+#endif
#include <pthread.h>
#include "sim_avr.h"