mirror of
git://projects.qi-hardware.com/f32xbase.git
synced 2024-11-04 23:21:53 +02:00
de75051afa
- f32x/Makefile: added support for building for different targets (for now, just TARGET=om) - f32x/c2-drv.h: interface for C2 drivers - f32x/c2-om.c: updated title - f32x/c2-om.c: renamed all c2_* to om_* and made them "static" - f32x/c2-om.c (c2_om): driver operations - f32x/c2.c: call driver operations - f32x/c2.h: moved protocol constants to c2-drv.h
63 lines
1.2 KiB
Makefile
63 lines
1.2 KiB
Makefile
#
|
|
# f32x/Makefile - Build the C8051F326/7 Flash programmer
|
|
#
|
|
# Written 2008, 2010 by Werner Almesberger
|
|
# Copyright 2008, 2010 Werner Almesberger
|
|
#
|
|
# 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.
|
|
#
|
|
|
|
|
|
PREFIX=/usr
|
|
|
|
ifeq ($(TARGET),)
|
|
TARGET = om
|
|
endif
|
|
|
|
CC_om = arm-angstrom-linux-gnueabi-gcc
|
|
|
|
CFLAGS_om = -O -DDRIVER=c2_om
|
|
|
|
LDFLAGS_om =
|
|
|
|
OBJS_om = c2-om.o gpio.o rt.o
|
|
|
|
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))
|
|
|
|
|
|
.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
|
|
|
|
clean:
|
|
rm -f $(OBJS) $(OBJS_om) .depend
|
|
|
|
spotless: clean
|
|
rm -f $(NAME)
|