1
0
mirror of git://projects.qi-hardware.com/f32xbase.git synced 2024-12-26 08:35:12 +02:00
f32xbase/f32x/Makefile
Werner Almesberger 901998526e f32x/: renamed OpenWRT target from "ben" to "ben_openwrt" and added "ben_jlime"
- f32x/Makefile: set default target to ben_jlime instead of "ben"
- f32x/Makefile (CC_ben, CFLAGS_ben, LDFLAGS_ben, OBJS_ben, UPLOAD_ben):
  renamed to *_openwrt and added *_jlime equivalents
2011-01-10 12:39:43 -03:00

78 lines
1.6 KiB
Makefile

#
# f32x/Makefile - Build the C8051F326/7 Flash programmer
#
# Written 2008, 2010-2011 by Werner Almesberger
# Copyright 2008, 2010-2011 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 = ben_jlime
endif
CC_om = arm-angstrom-linux-gnueabi-gcc
CC_ben_jlime = mipsel-linux-gcc
CC_ben_openwrt = mipsel-openwrt-linux-gcc
CFLAGS_om = -O -DDRIVER=c2_om
CFLAGS_ben_jlime = -DDRIVER=c2_ben
CFLAGS_ben_openwrt = -DDRIVER=c2_ben
LDFLAGS_om =
LDFLAGS_ben_jlime =
LDFLAGS_ben_openwrt =
OBJS_om = c2-om.o gpio-s3c24xx.o rt.o
OBJS_ben_jlime = c2-ben.o gpio-xburst.o
OBJS_ben_openwrt = c2-ben.o gpio-xburst.o
UPLOAD_om = ssh lab neo 'cat \>f32x' <f32x
UPLOAD_ben_jlime = scp f32x jlime:
UPLOAD_ben_openwrt = scp f32x ben:
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:
$(UPLOAD_$(TARGET))
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
c2-om.o: c2-bitbang.c
c2-ben.o: c2-bitbang.c
clean:
rm -f $(OBJS) $(OBJS_om) $(OBJS_ben) .depend
spotless: clean
rm -f $(NAME)