]> cvs.zerfleddert.de Git - proxmark3-svn/blob - common/Makefile.common
38271f51bc65f8c519ad132b5cecff7e479fd945
[proxmark3-svn] / common / Makefile.common
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
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)
15 DELETE=rm -rf
16 PATHSEP=/
17 DETECTED_OS=Linux
18 # You may/should set this in your environment
19 ARMLIB ?= /usr/local/lib/gcc/arm-elf/4.3.3/interwork
20 endif
21 else
22 # Assume that we are running on Windows.
23 DELETE=del /q
24 PATHSEP=\\#
25 ARMLIB ?= ../../devkitARM/lib/gcc/arm-elf/4.1.0/interwork
26 DETECTED_OS=Windows
27 endif
28
29 CC = arm-elf-gcc
30 AS = arm-elf-as
31 LD = arm-elf-ld
32 OBJCOPY = arm-elf-objcopy
33
34 OBJDIR = obj
35
36 INCLUDE = -I../include
37
38 # Also search prerequisites in the common directory (for usb.c)
39 VPATH = . ../common/
40
41 INCLUDES = ../include/proxmark3.h ../include/at91sam7s128.h ../include/config_gpio.h ../include/usb_cmd.h $(APP_INCLUDES)
42
43 CFLAGS = -c $(INCLUDE) -Wall $(APP_CFLAGS)
Impressum, Datenschutz