Procházet zdrojové kódy

add options for cross compiling

pull/62/head
Nico Bollen před 5 roky
rodič
revize
7171aba5e4
4 změnil soubory, kde provedl 53 přidání a 5 odebrání
  1. +14
    -2
      devLib/Makefile
  2. +13
    -1
      gpio/Makefile
  3. +13
    -1
      wiringPi/Makefile
  4. +13
    -1
      wiringPiD/Makefile

+ 14
- 2
devLib/Makefile Zobrazit soubor

@@ -36,8 +36,20 @@ DYNAMIC=libwiringPiDev.so.$(VERSION)

#DEBUG = -g -O0
DEBUG = -O2
CC = gcc
INCLUDE = -I.

GCC_ARCH := $(shell gcc -dumpmachine)

ifeq ($(OS),Windows_NT)
CROSS_COMPILE ?= arm-linux-gnueabihf-
else
ifneq ($(GCC_ARCH),arm-linux-gnueabihf)
CROSS_COMPILE ?= arm-linux-gnueabihf-
endif
endif

CC = $(CROSS_COMPILE)gcc

INCLUDE = -I. -I/usr/local/include
DEFS = -D_GNU_SOURCE
CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC



+ 13
- 1
gpio/Makefile Zobrazit soubor

@@ -32,7 +32,19 @@ endif

#DEBUG = -g -O0
DEBUG = -O2
CC = gcc

GCC_ARCH := $(shell gcc -dumpmachine)

ifeq ($(OS),Windows_NT)
CROSS_COMPILE ?= arm-linux-gnueabihf-
else
ifneq ($(GCC_ARCH),arm-linux-gnueabihf)
CROSS_COMPILE ?= arm-linux-gnueabihf-
endif
endif

CC = $(CROSS_COMPILE)gcc

INCLUDE = -I$(DESTDIR)$(PREFIX)/include
CFLAGS = $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe



+ 13
- 1
wiringPi/Makefile Zobrazit soubor

@@ -36,7 +36,19 @@ DYNAMIC=libwiringPi.so.$(VERSION)

#DEBUG = -g -O0
DEBUG = -O2
CC = gcc

GCC_ARCH := $(shell gcc -dumpmachine)

ifeq ($(OS),Windows_NT)
CROSS_COMPILE ?= arm-linux-gnueabihf-
else
ifneq ($(GCC_ARCH),arm-linux-gnueabihf)
CROSS_COMPILE ?= arm-linux-gnueabihf-
endif
endif

CC = $(CROSS_COMPILE)gcc

INCLUDE = -I.
DEFS = -D_GNU_SOURCE
CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Winline $(INCLUDE) -pipe -fPIC


+ 13
- 1
wiringPiD/Makefile Zobrazit soubor

@@ -31,7 +31,19 @@ endif

#DEBUG = -g -O0
DEBUG = -O2
CC = gcc

GCC_ARCH := $(shell gcc -dumpmachine)

ifeq ($(OS),Windows_NT)
CROSS_COMPILE ?= arm-linux-gnueabihf-
else
ifneq ($(GCC_ARCH),arm-linux-gnueabihf)
CROSS_COMPILE ?= arm-linux-gnueabihf-
endif
endif

CC = $(CROSS_COMPILE)gcc

INCLUDE = -I$(DESTDIR)$(PREFIX)/include
CFLAGS = $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe



Načítá se…
Zrušit
Uložit