Bladeren bron

add options for cross compiling

pull/62/head
Nico Bollen 5 jaren geleden
bovenliggende
commit
7171aba5e4
4 gewijzigde bestanden met toevoegingen van 53 en 5 verwijderingen
  1. +14
    -2
      devLib/Makefile
  2. +13
    -1
      gpio/Makefile
  3. +13
    -1
      wiringPi/Makefile
  4. +13
    -1
      wiringPiD/Makefile

+ 14
- 2
devLib/Makefile Bestand weergeven

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

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

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

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



Laden…
Annuleren
Opslaan