C8051F32x firmware infrastructure

Sign in or create your account | Project List | Help

C8051F32x firmware infrastructure Git Source Tree

Root/f32x/Makefile

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
14PREFIX=/usr
15
16ifeq ($(TARGET),)
17TARGET = ben_jlime
18endif
19
20CC_om = arm-angstrom-linux-gnueabi-gcc
21CC_ben_jlime = mipsel-linux-gcc
22CC_ben_openwrt = mipsel-openwrt-linux-gcc
23
24CFLAGS_om = -O -DDRIVER=c2_om
25CFLAGS_ben_jlime = -DDRIVER=c2_ben
26CFLAGS_ben_openwrt = -DDRIVER=c2_ben
27
28LDFLAGS_om =
29LDFLAGS_ben_jlime =
30LDFLAGS_ben_openwrt =
31
32OBJS_om = c2-om.o gpio-s3c24xx.o rt.o
33OBJS_ben_jlime = c2-ben.o gpio-xburst.o
34OBJS_ben_openwrt = c2-ben.o gpio-xburst.o
35
36UPLOAD_om = ssh lab neo 'cat \>f32x' <f32x
37UPLOAD_ben_jlime = scp f32x jlime:
38UPLOAD_ben_openwrt = scp f32x ben:
39
40NAME = f32x
41CC = $(CC_$(TARGET))
42CFLAGS = -Wall -Wshadow -g $(CFLAGS_$(TARGET))
43LDFLAGS = $(LDFLAGS_$(TARGET))
44OBJS = f32x.o flash.o c2.o boundary.o $(OBJS_$(TARGET))
45
46
47.PHONY: all install uninstall clean depend spotless
48
49all: $(NAME)
50
51$(NAME): $(OBJS)
52
53upload:
54        $(UPLOAD_$(TARGET))
55
56install: $(NAME)
57        install -D $(NAME) $(PREFIX)/bin/$(NAME)
58
59uninstall:
60        rm -f $(PREFIX)/bin/$(NAME)
61
62depend:
63        $(CPP) $(CFLAGS) -MM -MG *.c >.depend || \
64          { rm -f .depend; exit 1; }
65
66ifeq (.depend,$(wildcard .depend))
67include .depend
68endif
69
70c2-om.o: c2-bitbang.c
71c2-ben.o: c2-bitbang.c
72
73clean:
74        rm -f $(OBJS) $(OBJS_om) $(OBJS_ben) .depend
75
76spotless: clean
77        rm -f $(NAME)
78

Archive Download this file

Branches:
master



interactive