Werner's Miscellanea
Sign in or create your account | Project List | Help
Werner's Miscellanea Git Source Tree
Root/
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 | |
14 | PREFIX=/usr |
15 | |
16 | ifeq ($(TARGET),) |
17 | TARGET = ben_openwrt |
18 | endif |
19 | |
20 | CC_ben_jlime = mipsel-linux-gcc |
21 | CC_ben_openwrt = mipsel-openwrt-linux-gcc |
22 | |
23 | UPLOAD_ben_jlime = scp f32x jlime: |
24 | UPLOAD_ben_openwrt = scp f32x ben: |
25 | |
26 | NAME = picpen |
27 | CC = $(CC_$(TARGET)) |
28 | CFLAGS = -Wall -Wshadow -O9 -g -static |
29 | OBJS = picpen.o gpio-xburst.o |
30 | LDFLAGS = -static |
31 | |
32 | |
33 | .PHONY: all install uninstall clean depend spotless |
34 | |
35 | all: $(NAME) |
36 | |
37 | $(NAME): $(OBJS) |
38 | |
39 | upload: |
40 | $(UPLOAD_$(TARGET)) |
41 | |
42 | install: $(NAME) |
43 | install -D $(NAME) $(PREFIX)/bin/$(NAME) |
44 | |
45 | uninstall: |
46 | rm -f $(PREFIX)/bin/$(NAME) |
47 | |
48 | depend: |
49 | $(CPP) $(CFLAGS) -MM -MG *.c >.depend || \ |
50 | { rm -f .depend; exit 1; } |
51 | |
52 | ifeq (.depend,$(wildcard .depend)) |
53 | include .depend |
54 | endif |
55 | |
56 | clean: |
57 | rm -f $(OBJS) $(OBJS_ben) .depend |
58 | |
59 | spotless: clean |
60 | rm -f $(NAME) |
61 |
Branches:
master