Skip to content

Instantly share code, notes, and snippets.

@adampash
Created December 9, 2013 20:44
Show Gist options
  • Save adampash/7880506 to your computer and use it in GitHub Desktop.
Save adampash/7880506 to your computer and use it in GitHub Desktop.
Trying to get a Makefile working with NaCl OpenCV port
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# GNU Makefile based on shared rules provided by the Native Client SDK.
# See README.Makefiles for more details.
VALID_TOOLCHAINS := newlib glibc pnacl
NACL_SDK_ROOT ?= $(abspath $(CURDIR)/../..)
include $(NACL_SDK_ROOT)/tools/common.mk
TARGET = part2
LIBS = $(DEPS) ppapi_cpp ppapi \
pthread \
opencv_imgproc opencv_highgui opencv_core opencv_objdetect \
png tiff jpeg
CFLAGS = -Wall V=1
SOURCES = hello_tutorial.cc
CFLAGS:=$(INCLUDES)
# Build rules generated by macros from common.mk:
$(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src),$(CFLAGS))))
ifeq ($(CONFIG),Release)
$(eval $(call LINK_RULE,$(TARGET)_unstripped,$(SOURCES),$(LIBS),$(DEPS)))
$(eval $(call STRIP_RULE,$(TARGET),$(TARGET)_unstripped))
else
$(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS),$(DEPS)))
endif
$(eval $(call NMF_RULE,$(TARGET),))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment