Commit e7edc2e9 authored by Brenden Tisler's avatar Brenden Tisler
Browse files

Added Makefiles

parent eed80f1a
if(EXISTS "$ENV{HOME}/EMAC-SDK/example-projects/toolchain-selector.cmake")
include($ENV{HOME}/EMAC-SDK/example-projects/toolchain-selector.cmake)
else()
MESSAGE(FATAL_ERROR "ERROR: Toolchain selection could not be found at $ENV{HOME}/EMAC-SDK/example-projects/toolchain-selector.cmake")
endif()
cmake_minimum_required(VERSION 2.6)
project (example)
add_executable(dev-iot6u_mikrobus_demo dev-iot6u_mikrobus_demo.c)
file(WRITE "${CMAKE_SOURCE_DIR}/QtCreatorDeployment.txt" "/tmp\n")
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/dev-iot6u_mikrobus_demo DESTINATION share/qt-creator-examples)
INSTALL(TARGETS dev-iot6u_mikrobus_demo RUNTIME DESTINATION bin)
# Source the appropriat architecture environment setup script prior to running make
# source /opt/emac/5.X/environment-setup-armv5e-emac-linux-gnueabi
# source /opt/emac/5.X/environment-setup-i586-emac-linux
TARGET=dev-iot6u_mikrobus_demo
CFILES=dev-iot6u_mikrobus_demo.c
LOGIN := root
TARGET_IP :=
OBJS=$(CFILES:.c=.o)
DEPS=$(OBJS:.o=.d)
all: $(TARGET)
$(TARGET): $(OBJS) Makefile
$(CC) $(VERBOSE) $(OBJS) $(OFLAGS) $(LIBFLAGS) $(SLIBS) -o $@
%.o: %.c
$(CC) $(VERBOSE) $(CFLAGS) -o $@ -c $<
clean:
$(RM) *.o *.gdb $(TARGET) $(DEPS)
upload: all
scp $(TARGET) $(LOGIN)@$(TARGET_IP):/tmp/
-include $(DEPS)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment