2014-01-17 12:49:48 +01:00
|
|
|
####
|
|
|
|
#### Sample Makefile for building apps with the RIOT OS
|
|
|
|
####
|
|
|
|
#### The Sample Filesystem Layout is:
|
|
|
|
#### /this makefile
|
2014-02-11 18:15:43 +01:00
|
|
|
#### ../../RIOT
|
2014-01-17 12:49:48 +01:00
|
|
|
#### ../../boards for board definitions (if you have one or more)
|
2014-02-11 18:15:43 +01:00
|
|
|
####
|
2014-01-17 12:49:48 +01:00
|
|
|
|
2014-02-10 15:28:55 +01:00
|
|
|
# name of your application
|
2014-01-17 12:49:48 +01:00
|
|
|
export PROJECT =test_pnet
|
|
|
|
|
|
|
|
# for easy switching of boards
|
|
|
|
ifeq ($(strip $(BOARD)),)
|
|
|
|
export BOARD = native
|
|
|
|
endif
|
|
|
|
|
|
|
|
# this has to be the absolute path of the RIOT-base dir
|
|
|
|
export RIOTBASE =$(CURDIR)/../..
|
|
|
|
export RIOTBOARD =$(RIOTBASE)/boards
|
|
|
|
|
|
|
|
ifeq ($(BOARD),stm32f4discovery)
|
|
|
|
include Makefile.$(BOARD)
|
|
|
|
endif
|
|
|
|
|
2014-02-11 18:15:43 +01:00
|
|
|
## Modules to include.
|
2014-01-17 12:49:48 +01:00
|
|
|
|
|
|
|
USEMODULE += auto_init
|
|
|
|
USEMODULE += posix
|
|
|
|
USEMODULE += pnet
|
|
|
|
USEMODULE += vtimer
|
|
|
|
ifeq ($(strip $(BOARD)),native)
|
|
|
|
USEMODULE += nativenet
|
|
|
|
else ifeq ($(strip $(BOARD)),msba2)
|
|
|
|
USEMODULE += cc110x_ng
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BOARD),native)
|
|
|
|
CFLAGS += -isystem $(RIOTBASE)/sys/net/include \
|
|
|
|
-isystem $(RIOTBASE)/sys/posix/pnet/include
|
|
|
|
else
|
|
|
|
export INCLUDES += -I$(RIOTBASE)/sys/net/include \
|
|
|
|
-I$(RIOTBASE)/sys/posix/pnet/include \
|
|
|
|
-I$(RIOTBASE)/sys/posix/include
|
|
|
|
endif
|
|
|
|
|
|
|
|
include $(RIOTBASE)/Makefile.include
|