Skip to content

Commit

Permalink
Added ecos project
Browse files Browse the repository at this point in the history
  • Loading branch information
rui-bettencourt committed Dec 4, 2018
1 parent 078a64e commit 6fd4028
Show file tree
Hide file tree
Showing 9 changed files with 1,182 additions and 0 deletions.
44 changes: 44 additions & 0 deletions ProjetoEcos/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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

#####
OBJS= main.o comando.o monitor.o processing.o

# RULES

.PHONY: all clean

all: main

clean:
-rm -f main $(OBJS)

%.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) $<

main: $(OBJS)
$(XLD) $(LDFLAGS) $(ECOS_GLOBAL_LDFLAGS) -o $@ $(OBJS)
Loading

0 comments on commit 6fd4028

Please sign in to comment.