2009-08-26 19:17:05 +08:00
|
|
|
# Makefile for armsrc, see ../common/Makefile.common for common settings
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-08-26 19:17:05 +08:00
|
|
|
APP_INCLUDES = apps.h
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-09-22 17:57:03 +08:00
|
|
|
#remove one of the following defines and comment out the relevant line
|
|
|
|
#in the next section to remove that particular feature from compilation
|
2009-11-12 15:23:12 +08:00
|
|
|
APP_CFLAGS = -O6 -DWITH_LF -DWITH_ISO15693 -DWITH_ISO14443a -DWITH_ISO14443b
|
|
|
|
#-DWITH_LCD
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-09-22 17:57:03 +08:00
|
|
|
#SRC_LCD = fonts.c LCD.c
|
2009-11-12 15:23:12 +08:00
|
|
|
SRC_LF = lfops.c hitag2.c
|
2009-09-22 17:57:03 +08:00
|
|
|
SRC_ISO15693 = iso15693.c
|
|
|
|
SRC_ISO14443a = iso14443a.c
|
|
|
|
SRC_ISO14443b = iso14443.c
|
2009-08-27 01:34:19 +08:00
|
|
|
|
2009-08-28 07:29:49 +08:00
|
|
|
THUMBSRC = start.c \
|
2009-09-22 17:57:03 +08:00
|
|
|
$(SRC_LCD) \
|
|
|
|
$(SRC_ISO15693) \
|
2009-11-12 15:23:12 +08:00
|
|
|
$(SRC_LF) \
|
2009-12-30 10:18:25 +08:00
|
|
|
appmain.c printf.c \
|
2009-08-27 01:34:19 +08:00
|
|
|
util.c \
|
|
|
|
usb.c
|
|
|
|
|
|
|
|
# These are to be compiled in ARM mode
|
2009-09-22 17:57:03 +08:00
|
|
|
ARMSRC = fpgaloader.c \
|
2009-10-17 06:07:00 +08:00
|
|
|
legicrf.c \
|
Client cleanup and restructuring. Stage 1...
Next Step is refactoring some of the giant functions which are
just copy/paste of some other ones with just a few line changes,
removing unnecessary 'goto' etc.
The MS Windows version is broken with this commit but will be fixed
soon. Everything can't be done all at once :P
The commands are now hierarchical, for example:
"hf 14a read" vs. "hf 14b read".
You can also request help:
"hf help", "data help", "hf 15 help" etc.
Indents are now space-based, not tab-based anymore. Hopefully
no one will be trolling about it, considering the suicide-prone work
being done here ;)
client/cmdhw.c, client/proxusb.c, client/cmdhw.h, client/proxusb.h,
client/cmdmain.c, client/cmdlfhid.c, client/cmdmain.h, client/cmdlfhid.h,
client/data.c, client/data.h, client/cmdhf.c, client/cmdlf.c,
client/cmdhf.h, client/cmdhf15.c, client/cmdhf14b.c, client/cmdlf.h,
client/cmdhf15.h, client/cmdhf14b.h, client/cmddata.c, client/cmddata.h,
client/ui.c, client/cmdparser.c, client/cmdlfti.c, client/ui.h,
client/cmdlfem4x.c, client/cmdparser.h, client/cmdlfti.h, client/cmdlfem4x.h,
client/graph.c, client/graph.h, client/cmdhf14a.c, client/cmdhf14a.h,
client/cmdhflegic.c, client/cmdhflegic.c: New files.
client/cli.c, client/flasher.c, client/snooper.c, client/proxmark3.c,
client/proxmark3.h, client/Makefile: Update accordingly.
client/flash.h, client/flash.c, client/proxgui.cpp: Cosmetic changes.
client/translate.h, client/command.c, client/gui.c,
client/usb.c, client/prox.h: Remove.
include/usb_cmd.h (CMD_ACQUIRE_RAW_ADC_SAMPLES_ISO_14443_SIM): Remove dead cmd.
common/crc16.h: New file.
common/crc16.c: Modify accordingly.
common/iso14443crc.h: New file.
common/iso14443_crc.c: Rename to
common/iso14443crc.c: and modify accordingly.
armsrc/lfops.c, armsrc/iso14443.c,
armsrc/iso14443a.c: include .h files from
the common directory instead of including the c files.
common/Makefile.common, armsrc/Makefile: Modify accordingly.
2010-02-04 09:27:07 +08:00
|
|
|
iso14443crc.c \
|
|
|
|
crc16.c \
|
2009-09-22 17:57:03 +08:00
|
|
|
$(SRC_ISO14443a) \
|
2009-11-26 04:41:41 +08:00
|
|
|
$(SRC_ISO14443b) \
|
2010-02-05 16:18:02 +08:00
|
|
|
legic_prng.c \
|
2009-11-26 04:41:41 +08:00
|
|
|
crc.c
|
2009-04-26 05:19:59 +08:00
|
|
|
|
2010-02-20 11:07:55 +08:00
|
|
|
# stdint.h provided locally until GCC 4.5 becomes C99 compliant
|
|
|
|
APP_CFLAGS += -I.
|
|
|
|
|
2009-08-28 07:29:49 +08:00
|
|
|
# Do not move this inclusion before the definition of {THUMB,ASM,ARM}SRC
|
2009-08-27 01:34:19 +08:00
|
|
|
include ../common/Makefile.common
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-08-26 19:17:05 +08:00
|
|
|
all: $(OBJDIR)/osimage.s19 $(OBJDIR)/fpgaimage.s19
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-08-28 07:29:49 +08:00
|
|
|
$(OBJDIR)/fpga.o: fpga.bit
|
|
|
|
$(OBJCOPY) -O elf32-littlearm -I binary -B arm --redefine-sym _binary____fpga_fpga_bit_start=_binary_fpga_bit_start --redefine-sym _binary____fpga_fpga_bit_end=_binary_fpga_bit_end --prefix-sections=fpga_bit $^ $@
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-12-22 20:50:34 +08:00
|
|
|
$(OBJDIR)/fullimage.elf: $(VERSIONOBJ) $(OBJDIR)/fpga.o $(THUMBOBJ) $(ARMOBJ) $(LIBGCC)
|
2009-08-26 19:17:05 +08:00
|
|
|
$(LD) -g -Tldscript -Map=$(patsubst %.elf,%.map,$@) -o $@ $^
|
2009-04-09 14:43:20 +08:00
|
|
|
|
2009-08-28 07:29:49 +08:00
|
|
|
$(OBJDIR)/fpgaimage.elf: $(OBJDIR)/fullimage.elf
|
2009-08-29 14:14:28 +08:00
|
|
|
$(OBJCOPY) -F elf32-littlearm --only-section .fpgaimage $^ $@
|
2009-08-28 07:29:49 +08:00
|
|
|
|
|
|
|
$(OBJDIR)/osimage.elf: $(OBJDIR)/fullimage.elf
|
2009-08-29 14:14:28 +08:00
|
|
|
$(OBJCOPY) -F elf32-littlearm --remove-section .fpgaimage $^ $@
|
2009-08-28 07:29:49 +08:00
|
|
|
|
2009-04-09 14:43:20 +08:00
|
|
|
clean:
|
2009-08-26 19:17:05 +08:00
|
|
|
$(DELETE) $(OBJDIR)$(PATHSEP)*.o
|
|
|
|
$(DELETE) $(OBJDIR)$(PATHSEP)*.elf
|
|
|
|
$(DELETE) $(OBJDIR)$(PATHSEP)*.s19
|
|
|
|
$(DELETE) $(OBJDIR)$(PATHSEP)*.map
|
2009-08-27 01:34:19 +08:00
|
|
|
$(DELETE) $(OBJDIR)$(PATHSEP)*.d
|
2009-08-28 14:40:44 +08:00
|
|
|
$(DELETE) version.c
|
2009-08-26 19:17:05 +08:00
|
|
|
|
|
|
|
.PHONY: all clean help
|
|
|
|
help:
|
|
|
|
@echo Multi-OS Makefile, you are running on $(DETECTED_OS)
|
|
|
|
@echo Possible targets:
|
2009-08-27 12:25:34 +08:00
|
|
|
@echo + all - Make both:
|
|
|
|
@echo + $(OBJDIR)/osimage.s19 - The OS image
|
|
|
|
@echo + $(OBJDIR)/fpgaimage.s19 - The FPGA image
|
|
|
|
@echo + clean - Clean $(OBJDIR)
|
2009-08-27 01:34:19 +08:00
|
|
|
|