Root/bacon/prog/Makefile

1#
2# picpen/Makefile - PIC Programmer/Emulator for Nanonote
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_openwrt
18endif
19
20CC_ben_jlime = mipsel-linux-gcc
21CC_ben_openwrt = mipsel-openwrt-linux-gcc
22
23UPLOAD_ben_jlime = scp f32x jlime:
24UPLOAD_ben_openwrt = scp f32x ben:
25
26NAME = picpen
27CC = $(CC_$(TARGET))
28CFLAGS = -Wall -Wshadow -O9 -g -static
29OBJS = picpen.o gpio-xburst.o
30LDFLAGS = -static
31
32
33.PHONY: all install uninstall clean depend spotless
34
35all: $(NAME)
36
37$(NAME): $(OBJS)
38
39upload:
40        $(UPLOAD_$(TARGET))
41
42install: $(NAME)
43        install -D $(NAME) $(PREFIX)/bin/$(NAME)
44
45uninstall:
46        rm -f $(PREFIX)/bin/$(NAME)
47
48depend:
49        $(CPP) $(CFLAGS) -MM -MG *.c >.depend || \
50          { rm -f .depend; exit 1; }
51
52ifeq (.depend,$(wildcard .depend))
53include .depend
54endif
55
56clean:
57        rm -f $(OBJS) $(OBJS_ben) .depend
58
59spotless: clean
60        rm -f $(NAME)
61

Archive Download this file

Branches:
master



interactive