2010-08-13 14:46:38 +03:00
|
|
|
#
|
|
|
|
# f32x/Makefile - Build the C8051F326/7 Flash programmer
|
|
|
|
#
|
2010-10-21 16:03:42 +03:00
|
|
|
# Written 2008, 2010 by Werner Almesberger
|
|
|
|
# Copyright 2008, 2010 Werner Almesberger
|
2010-08-13 14:46:38 +03:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2010-10-21 16:03:42 +03:00
|
|
|
PREFIX=/usr
|
|
|
|
|
|
|
|
ifeq ($(TARGET),)
|
|
|
|
TARGET = om
|
|
|
|
endif
|
2010-08-13 14:46:38 +03:00
|
|
|
|
2010-10-21 16:03:42 +03:00
|
|
|
CC_om = arm-angstrom-linux-gnueabi-gcc
|
2010-08-13 14:46:38 +03:00
|
|
|
|
2010-10-21 16:03:42 +03:00
|
|
|
CFLAGS_om = -O -DDRIVER=c2_om
|
|
|
|
|
|
|
|
LDFLAGS_om =
|
|
|
|
|
2010-10-22 00:26:43 +03:00
|
|
|
OBJS_om = c2-om.o gpio-s3c24xx.o rt.o
|
2010-10-21 16:03:42 +03:00
|
|
|
|
|
|
|
NAME = f32x
|
|
|
|
CC = $(CC_$(TARGET))
|
|
|
|
CFLAGS = -Wall -Wshadow -g $(CFLAGS_$(TARGET))
|
|
|
|
LDFLAGS = $(LDFLAGS_$(TARGET))
|
|
|
|
OBJS = f32x.o flash.o c2.o boundary.o $(OBJS_$(TARGET))
|
2010-08-13 14:46:38 +03:00
|
|
|
|
|
|
|
|
|
|
|
.PHONY: all install uninstall clean depend spotless
|
|
|
|
|
|
|
|
all: $(NAME)
|
|
|
|
|
|
|
|
$(NAME): $(OBJS)
|
|
|
|
|
|
|
|
upload:
|
|
|
|
ssh lab neo 'cat \>f32x' <f32x
|
|
|
|
|
|
|
|
install: $(NAME)
|
|
|
|
install -D $(NAME) $(PREFIX)/bin/$(NAME)
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm -f $(PREFIX)/bin/$(NAME)
|
|
|
|
|
|
|
|
depend:
|
|
|
|
$(CPP) $(CFLAGS) -MM -MG *.c >.depend || \
|
|
|
|
{ rm -f .depend; exit 1; }
|
|
|
|
|
|
|
|
ifeq (.depend,$(wildcard .depend))
|
|
|
|
include .depend
|
|
|
|
endif
|
|
|
|
|
2010-10-22 01:09:43 +03:00
|
|
|
c2-om.o: c2-bitbang.c
|
|
|
|
|
2010-08-13 14:46:38 +03:00
|
|
|
clean:
|
2010-10-21 16:03:42 +03:00
|
|
|
rm -f $(OBJS) $(OBJS_om) .depend
|
2010-08-13 14:46:38 +03:00
|
|
|
|
|
|
|
spotless: clean
|
|
|
|
rm -f $(NAME)
|