1 # This new makefile replaces the previous Makefile/Makefile.linux
2 # with as much common code for both environments as possible.
3 # Following is a short OS detection to set up variables, all the
4 # remaining Makefile should be portable and only depend on these
7 # Windows' echo echos its input verbatim, on Posix there is some
8 # amount of shell command line parsing going on. echo "" on
9 # Windows yields literal "", on Linux yields an empty line
10 ifeq ($(shell echo ""),)
11 # This is properly a proper system, so we can use uname
12 UNAME := $(shell uname)
13 ifeq ($(UNAME), Linux)
14 # Linux. (Todo: Add MacOS X if appropriate)
18 # You may/should set this in your environment
19 ARMLIB ?= /usr/local/lib/gcc/arm-elf/4.3.3/interwork
22 # Assume that we are running on Windows.
25 ARMLIB ?= ../../devkitARM/lib/gcc/arm-elf/4.1.0/interwork
32 OBJCOPY = arm-elf-objcopy
36 INCLUDE = -I../include
38 # Also search prerequisites in the common directory (for usb.c)
41 INCLUDES = ../include/proxmark3.h ../include/at91sam7s128.h ../include/config_gpio.h ../include/usb_cmd.h $(APP_INCLUDES)
43 CFLAGS = -c $(INCLUDE) -Wall $(APP_CFLAGS)