C8051F32x firmware infrastructure
Sign in or create your account | Project List | Help
C8051F32x firmware infrastructure Git Source Tree
Root/
| 1 | # |
| 2 | # f32x/Makefile - Build the C8051F326/7 Flash programmer |
| 3 | # |
| 4 | # Written 2008, 2010-2011 by Werner Almesberger |
| 5 | # Copyright 2008, 2010-2011 Werner Almesberger |
| 6 | # |
| 7 | # This program is free software; you can redistribute it and/or modify |
| 8 | # it under the terms of the GNU General Public License as published by |
| 9 | # the Free Software Foundation; either version 2 of the License, or |
| 10 | # (at your option) any later version. |
| 11 | # |
| 12 | |
| 13 | |
| 14 | PREFIX=/usr |
| 15 | |
| 16 | ifeq ($(TARGET),) |
| 17 | TARGET = ben_jlime |
| 18 | endif |
| 19 | |
| 20 | CC_om = arm-angstrom-linux-gnueabi-gcc |
| 21 | CC_ben_jlime = mipsel-linux-gcc |
| 22 | CC_ben_openwrt = mipsel-openwrt-linux-gcc |
| 23 | |
| 24 | CFLAGS_om = -O -DDRIVER=c2_om |
| 25 | CFLAGS_ben_jlime = -DDRIVER=c2_ben |
| 26 | CFLAGS_ben_openwrt = -DDRIVER=c2_ben |
| 27 | |
| 28 | LDFLAGS_om = |
| 29 | LDFLAGS_ben_jlime = |
| 30 | LDFLAGS_ben_openwrt = |
| 31 | |
| 32 | OBJS_om = c2-om.o gpio-s3c24xx.o rt.o |
| 33 | OBJS_ben_jlime = c2-ben.o gpio-xburst.o |
| 34 | OBJS_ben_openwrt = c2-ben.o gpio-xburst.o |
| 35 | |
| 36 | UPLOAD_om = ssh lab neo 'cat \>f32x' <f32x |
| 37 | UPLOAD_ben_jlime = scp f32x jlime: |
| 38 | UPLOAD_ben_openwrt = scp f32x ben: |
| 39 | |
| 40 | NAME = f32x |
| 41 | CC = $(CC_$(TARGET)) |
| 42 | CFLAGS = -Wall -Wshadow -g $(CFLAGS_$(TARGET)) |
| 43 | LDFLAGS = $(LDFLAGS_$(TARGET)) |
| 44 | OBJS = f32x.o flash.o c2.o boundary.o $(OBJS_$(TARGET)) |
| 45 | |
| 46 | |
| 47 | .PHONY: all install uninstall clean depend spotless |
| 48 | |
| 49 | all: $(NAME) |
| 50 | |
| 51 | $(NAME): $(OBJS) |
| 52 | |
| 53 | upload: |
| 54 | $(UPLOAD_$(TARGET)) |
| 55 | |
| 56 | install: $(NAME) |
| 57 | install -D $(NAME) $(PREFIX)/bin/$(NAME) |
| 58 | |
| 59 | uninstall: |
| 60 | rm -f $(PREFIX)/bin/$(NAME) |
| 61 | |
| 62 | depend: |
| 63 | $(CPP) $(CFLAGS) -MM -MG *.c >.depend || \ |
| 64 | { rm -f .depend; exit 1; } |
| 65 | |
| 66 | ifeq (.depend,$(wildcard .depend)) |
| 67 | include .depend |
| 68 | endif |
| 69 | |
| 70 | c2-om.o: c2-bitbang.c |
| 71 | c2-ben.o: c2-bitbang.c |
| 72 | |
| 73 | clean: |
| 74 | rm -f $(OBJS) $(OBJS_om) $(OBJS_ben) .depend |
| 75 | |
| 76 | spotless: clean |
| 77 | rm -f $(NAME) |
| 78 |
Branches:
master
