forked from capiman/lpc21isp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (25 loc) · 774 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
all: lpc21isp
GLOBAL_DEP = adprog.h lpc21isp.h lpcprog.h lpcterm.h
CC = gcc
ifneq ($(findstring(freebsd, $(OSTYPE))),)
CFLAGS+=-D__FREEBSD__
endif
ifeq ($(OSTYPE),)
OSTYPE = $(shell uname)
endif
CFLAGS += -Wall
ifneq ($(findstring darwin,$(OSTYPE)),)
CFLAGS+=-D__APPLE__
else
CFLAGS += -static
endif
adprog.o: adprog.c $(GLOBAL_DEP)
$(CC) $(CDEBUG) $(CFLAGS) -c -o adprog.o adprog.c
lpcprog.o: lpcprog.c $(GLOBAL_DEP)
$(CC) $(CDEBUG) $(CFLAGS) -c -o lpcprog.o lpcprog.c
lpcterm.o: lpcterm.c $(GLOBAL_DEP)
$(CC) $(CDEBUG) $(CFLAGS) -c -o lpcterm.o lpcterm.c
lpc21isp: lpc21isp.c adprog.o lpcprog.o lpcterm.o $(GLOBAL_DEP)
$(CC) $(CDEBUG) $(CFLAGS) -o lpc21isp lpc21isp.c adprog.o lpcprog.o lpcterm.o
clean:
$(RM) adprog.o lpcprog.o lpcterm.o lpc21isp