Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move CFLAGS and DEFS definitions #467

Merged
merged 1 commit into from
Sep 14, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
platform = $(shell uname -m)

USB=$(shell pkg-config --cflags libusb-1.0) $(shell pkg-config --libs libusb-1.0)
DEFS = -D_LIN -D_DEBUG
DEFS = -D_LIN -D_DEBUG -DGLIBC_20
CFLAGS = -Wall -Wno-psabi -g -O2 -lpthread

ifeq ($(platform), armv6l)
OPENCV = $(shell pkg-config --cflags opencv) $(shell pkg-config --libs opencv)
Expand All @@ -13,6 +14,7 @@ ZWOSDK = -Llib/armv6 -I./include
endif

ifeq ($(platform), armv7l)
# Some distributions may need to use opencv4 and -DOPENCV_C_HEADERS as is done for x86_64
OPENCV = $(shell pkg-config --cflags opencv) $(shell pkg-config --libs opencv)
CC = arm-linux-gnueabihf-g++
AR= arm-linux-gnueabihf-ar
Expand All @@ -25,7 +27,6 @@ ifeq ($(platform), x86_64)
OPENCV = $(shell pkg-config --cflags opencv4) $(shell pkg-config --libs opencv4)
CC = g++
AR= ar
#At least on Ubuntu 20 x86_64 the c++ (.hpp) headers don't define all the constsants I need
DEFS += -DOPENCV_C_HEADERS
ZWOSDK = -Llib/x64 -I./include
endif
Expand All @@ -38,7 +39,7 @@ DEFS += -DOPENCV_C_HEADERS
ZWOSDK = -Llib/x86 -I./include
endif

CFLAGS = -Wall -Wno-psabi -g $(DEFS) $(COMMON) $(ZWOSDK) -lpthread -DGLIBC_20
CFLAGS += $(DEFS) $(ZWOSDK)

all:capture capture_RPiHQ startrails keogram sunwait-remove-precompiled sunwait

Expand Down