]> git.zerfleddert.de Git - proxmark3-svn/blame - common/Makefile.common
Consolidate Linux/Windows Makefiles into one, see http://www.proxmark.org/forum/topic...
[proxmark3-svn] / common / Makefile.common
CommitLineData
7e931bbd 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
5# variables
6
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
10ifeq ($(shell echo ""),)
11# This is properly a proper system, so we can use uname
12UNAME := $(shell uname)
13ifeq ($(UNAME), Linux)
14# Linux. (Todo: Add MacOS X if appropriate)
15DELETE=rm -rf
16PATHSEP=/
17DETECTED_OS=Linux
18# You may/should set this in your environment
19ARMLIB ?= /usr/local/lib/gcc/arm-elf/4.3.3/interwork
20endif
21else
22# Assume that we are running on Windows.
23DELETE=del /q
24PATHSEP=\\#
25ARMLIB ?= ../../devkitARM/lib/gcc/arm-elf/4.1.0/interwork
26DETECTED_OS=Windows
27endif
28
29CC = arm-elf-gcc
30AS = arm-elf-as
31LD = arm-elf-ld
32OBJCOPY = arm-elf-objcopy
33
34OBJDIR = obj
35
36INCLUDE = -I../include
37
38# Also search prerequisites in the common directory (for usb.c)
39VPATH = . ../common/
40
41INCLUDES = ../include/proxmark3.h ../include/at91sam7s128.h ../include/config_gpio.h ../include/usb_cmd.h $(APP_INCLUDES)
42
43CFLAGS = -c $(INCLUDE) -Wall $(APP_CFLAGS)
Impressum, Datenschutz