blob: 7bad31af4d88aee33b2d1963606d95c3033bfea7 (
plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
--- a/fixchksum/Makefile
+++ b/fixchksum/Makefile
@@ -2,11 +2,9 @@
# Makefile for fixchksum
#
-CC=gcc
APP=fixchksum
-INCLUDES=-I.
-OPTIONS=-O2 -Wall
-CFLAGS=$(INCLUDES) $(OPTIONS)
+CPPFLAGS+=-I.
+CFLAGS+=-Wall -std=gnu99
SRCS=fixchksum.c
OBJECTS = fixchksum.o
@@ -17,10 +15,6 @@
all: $(APP)
-$(APP): $(OBJECTS)
- $(CC) $(OBJECTS) -o $(APP)
- strip $(APP)
-
clean:
rm -f $(APP).o
rm -f $(APP)
--- a/Makefile
+++ b/Makefile
@@ -3,11 +3,9 @@
# PIC programmer interface
#
-CC=gcc
APP=picp
-INCLUDES=-I.
-OPTIONS=-O2 -Wall -x c++
-CFLAGS=$(INCLUDES) $(OPTIONS)
+CPPFLAGS+=-I.
+CFLAGS+=-Wall -std=gnu99
SRCS=main.c serial.c record.c parse.c atoi_base.c
OBJECTS = main.o serial.o record.o parse.o atoi_base.o
@@ -19,16 +17,7 @@
all: $(APP) convert convertshort
$(APP): $(OBJECTS)
- $(CC) $(OBJECTS) -lstdc++ -o $(APP)
- strip $(APP)
-
-convert: convert.c
- $(CC) -O2 -Wall -o convert convert.c
- strip convert
-
-convertshort: convertshort.c
- $(CC) -O2 -Wall -o convertshort convertshort.c
- strip convertshort
+ $(CC) $(LDFLAGS) $(OBJECTS) -o $(APP)
clean:
rm -f *.o
--- a/picsnoop/Makefile
+++ b/picsnoop/Makefile
@@ -3,12 +3,9 @@
#
APP=picsnoop
-CC=gcc
-INCLUDES=
-OPTIONS=-O2 -Wall -x c++
-CFLAGS=$(INCLUDES) $(OPTIONS)
-OBJECTS = picsnoop.o serial.o
+CFLAGS+=-Wall -std=gnu99
+OBJECTS = serial.o
WINCC=/usr/local/cross-tools/bin/i386-mingw32msvc-gcc
WINCFLAGS=-Wall -O2 -fomit-frame-pointer -s -I/usr/local/cross-tools/include -D_WIN32 -DWIN32
@@ -18,8 +15,6 @@
all : $(APP)
$(APP) : $(OBJECTS)
- $(CC) $(OBJECTS) -lstdc++ -o $(APP)
- strip $(APP)
clean :
rm -f *.o
|