view examples/Makefile @ 3077:2dde4203a2c7

* cdl/io_can.cdl: support for add/remove compiler flags * doc/can.sgml, doc/can_driver_doc.html: updated doc reflecting API changes (range/mask filtering, listen-only mode, return values for xmt_msg/rcv_event, new flags). * include/can.h: given in a match the types of function pointers for can_callbacks_t according to the changes made in can.c. * include/canio.h: flags field in event enlarged to 32 bits to fit new events 'CYGNUM_CAN_EVENT_ERR_ACTIVE' and 'CYGNUM_CAN_EVENT_OVERRUN_RX_HW'. Made a 'flag' typedef. cyg_can_event fields reordered so flags size change keeps events the same size. Defined new filtering capabilities (range/mask). New convenience macro CYGNUM_CAN_EVENT_ALL. New listen-only mode. * src/can.c: can_rcv_event() and can_xmt_msg() now returns cyg_bool (were 'void'). flags using cyg_can_event_flags_t type. [ Bugzilla 1001453 ]
author sergeig
date Thu, 09 Feb 2012 21:16:48 +0000
parents e942a29011aa
children
line wrap: on
line source

# 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