diff options
author | Michael Gielda <mgielda@antmicro.com> | 2014-04-03 14:53:04 +0200 |
---|---|---|
committer | Michael Gielda <mgielda@antmicro.com> | 2014-04-03 14:53:04 +0200 |
commit | ae1e4e08a1005a0c487f03ba189d7536e7fdcba6 (patch) | |
tree | f1c296f8a966a9a39876b0e98e16d9c5da1776dd /ecos/examples/Makefile | |
parent | f157da5337118d3c5cd464266796de4262ac9dbd (diff) |
Added the OS files
Diffstat (limited to 'ecos/examples/Makefile')
-rw-r--r-- | ecos/examples/Makefile | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/ecos/examples/Makefile b/ecos/examples/Makefile new file mode 100644 index 0000000..77ea85c --- /dev/null +++ b/ecos/examples/Makefile @@ -0,0 +1,55 @@ +# Mostly written by Jonathan Larmour, Red Hat, Inc. +# Reference to ecos.mak added by John Dallaway, eCosCentric Limited, 2003-01-20 +# This file is in the public domain and may be used for any purpose + +# Usage: make INSTALL_DIR=/path/to/ecos/install + +INSTALL_DIR=$$(INSTALL_DIR) # override on make command line + +include $(INSTALL_DIR)/include/pkgconf/ecos.mak + +XCC = $(ECOS_COMMAND_PREFIX)gcc +XCXX = $(XCC) +XLD = $(XCC) + +CFLAGS = -I$(INSTALL_DIR)/include +CXXFLAGS = $(CFLAGS) +LDFLAGS = -nostartfiles -L$(INSTALL_DIR)/lib -Ttarget.ld + +# RULES + +.PHONY: all clean + +all: hello twothreads simple-alarm serial + +clean: + -rm -f hello hello.o twothreads twothreads.o + -rm -f simple-alarm simple-alarm.o serial serial.o + -rm -f instrument-test instrument-test.o + +%.o: %.c + $(XCC) -c -o $*.o $(CFLAGS) $(ECOS_GLOBAL_CFLAGS) $< + +%.o: %.cxx + $(XCXX) -c -o $*.o $(CXXFLAGS) $(ECOS_GLOBAL_CFLAGS) $< + +%.o: %.C + $(XCXX) -c -o $*.o $(CXXFLAGS) $(ECOS_GLOBAL_CFLAGS) $< + +%.o: %.cc + $(XCXX) -c -o $*.o $(CXXFLAGS) $(ECOS_GLOBAL_CFLAGS) $< + +hello: hello.o + $(XLD) $(LDFLAGS) $(ECOS_GLOBAL_LDFLAGS) -o $@ $@.o + +twothreads: twothreads.o + $(XLD) $(LDFLAGS) $(ECOS_GLOBAL_LDFLAGS) -o $@ $@.o + +simple-alarm: simple-alarm.o + $(XLD) $(LDFLAGS) $(ECOS_GLOBAL_LDFLAGS) -o $@ $@.o + +serial: serial.o + $(XLD) $(LDFLAGS) $(ECOS_GLOBAL_LDFLAGS) -o $@ $@.o + +instrument-test: instrument-test.o + $(XLD) $(LDFLAGS) $(ECOS_GLOBAL_LDFLAGS) -o $@ $@.o |