se505-buildsystem/tools/Makefile

39 lines
748 B
Makefile
Raw Normal View History

2007-06-15 15:11:23 +02:00
CFLAGS := -O2 -Wall
2007-06-15 15:12:02 +02:00
all: gen_image split_image untrx trx split_linux
2007-06-15 15:11:23 +02:00
2007-06-15 15:12:02 +02:00
gen_image: gen_image.o crc.o
gcc gen_image.o crc.o -o gen_image
2007-06-15 15:11:23 +02:00
gen_image.o: gen_image.c
gcc $(CFLAGS) -I. -c gen_image.c
2007-06-15 15:12:02 +02:00
crc.o: crc.c
gcc $(CFLAGS) -c crc.c
2007-06-15 15:11:23 +02:00
split_image: split_image.c
gcc $(CFLAGS) -I. split_image.c -o split_image
2007-06-15 15:12:02 +02:00
trx: trx.o crc.o
gcc trx.o crc.o -o trx
trx.o: trx.c
gcc $(CFLAGS) -I. -c trx.c
2007-06-15 15:11:23 +02:00
untrx: untrx.c
gcc $(CFLAGS) -I. untrx.c -o untrx
split_linux: split_linux.c
gcc $(CFLAGS) -I. split_linux.c -o split_linux
clean:
2007-06-15 15:12:02 +02:00
rm -f *.o gen_image split_image trx untrx split_linux
2007-06-15 15:11:23 +02:00
dist:
2007-06-15 15:12:02 +02:00
tar -czf image-tools.tar.gz Makefile *.c *.h
testcrc: trx
./trx.org trx.o | xxd > _test1.hex
./trx trx.o | xxd > _test2.hex
diff _test1.hex _test2.hex