Fix build

Change-Id: If550f0db40be8085fade58896f7d8a1b7db2cb47
This commit is contained in:
Felix Raimundo
2016-03-11 18:47:40 +01:00
parent 15d91052f2
commit fd972bce65
8 changed files with 17 additions and 12 deletions

View File

@@ -51,7 +51,7 @@ info:
@echo "==============================="
ifeq ($(USE_LIBA),0)
LDFLAGS += -lc -lc++ -lcrt1.o
#LDFLAGS += -lc -lc++ -lcrt1.o
else
SFLAGS += -ffreestanding -nostdinc -nostdlib
include liba/Makefile
@@ -65,7 +65,7 @@ include quiz/Makefile # Quiz should be included at the end
%.elf: $(objs)
@echo "LD $@"
@$(LD) $(LDFLAGS) $^ -o $@
$(LD) $^ $(LDFLAGS) -o $@
.PHONY: %_size
%_size: %.elf

View File

@@ -1,5 +1,5 @@
TOOLCHAIN=arm-none-eabi
COMPILER=llvm
#COMPILER=llvm
ifeq ($(COMPILER),llvm)
CC=clang

View File

@@ -1,6 +1,6 @@
CC=clang
CXX=clang++
LD=ld
CC=gcc
CXX=g++
LD=g++
SIZE=size
#GDB=gdb
#OBJCOPY=$(TOOLCHAIN)-objcopy

View File

@@ -4,4 +4,6 @@ objs += $(addprefix ion/src/simulator/display/, fltklcd.o)
objs += $(addprefix ion/src/simulator/keyboard/, fltkkbd.o)
#SFLAGS += -I/usr/local/Cellar/fltk/1.3.3/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT
LDFLAGS += -L/usr/local/Cellar/fltk/1.3.3/lib -lfltk -lpthread -framework Cocoa
SFLAGS += `fltk-config --cflags`
#LDFLAGS += -L/usr/local/Cellar/fltk/1.3.3/lib -lfltk -lpthread -framework Cocoa
LDFLAGS += `fltk-config --ldflags`

View File

@@ -1,6 +1,6 @@
#include "fltklcd.h"
#include <stdlib.h>
#include <FL/Fl_draw.H>
#include <FL/fl_draw.H>
FltkLCD::FltkLCD(int x, int y, int w, int h, const char * label) :
Fl_Widget(x, y, w, h, label) {

View File

@@ -2,16 +2,18 @@ SFLAGS += -Ikandinsky/include
objs += $(addprefix kandinsky/src/, font.o line.o pixel.o rect.o text.o types.o)
tests += $(addprefix kandinsky/test/, set_pixel.c)
FREETYPE_PATH := /usr/local/Cellar/freetype/2.5.5
FREETYPE_PATH := /usr/local/Cellar/freetype/2.6.3
# LIBPNG_PATH is optional. If LIBPNG_PATH is not defined, rasterizer will be
# built w/o PNG support and simply won't output an image of the rasterization
LIBPNG_PATH := /usr/local/Cellar/libpng/1.6.17
#LIBPNG_PATH := /usr/local/Cellar/libpng/1.6.21
kandinsky/src/text.c: kandinsky/src/font.h
font_files = $(addprefix kandinsky/src/, font.h font.c)
RASTERIZER_FLAGS := -I$(FREETYPE_PATH)/include/freetype2 -L$(FREETYPE_PATH)/lib -lfreetype
RASTERIZER_CFLAGS := -std=c99 `freetype-config --cflags`
RASTERIZER_LDFLAGS := `freetype-config --libs`
ifdef LIBPNG_PATH
font_files += kandinsky/src/font.png
RASTERIZER_FLAGS += -I$(LIBPNG_PATH)/include -DGENERATE_PNG=1 -L$(LIBPNG_PATH)/lib -lpng
@@ -27,7 +29,7 @@ kandinsky/src/font.c: kandinsky/fonts/rasterizer
kandinsky/fonts/rasterizer: kandinsky/fonts/rasterizer.c
@echo "HOSTCC $@"
@clang $(RASTERIZER_FLAGS) $< -o $@
gcc $(RASTERIZER_CFLAGS) $< $(RASTERIZER_LDFLAGS) -o $@
products += $(font_files) kandinsky/fonts/rasterizer

Binary file not shown.

View File

@@ -12,6 +12,7 @@
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdint.h>
#include <ft2build.h>
#include FT_FREETYPE_H