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
88
89
90
91
92
93
94
95
96
97
98
99
|
--- Makefile.orig Tue Jan 28 06:24:21 2003
+++ Makefile Thu Jan 30 20:19:25 2003
@@ -28,20 +28,20 @@
#
# Pick your C++ compiler.
#
-CC=g++
+CXX?=${CXX}
# CC=gcc
#
# Pick your YACC processor
#
-YACC = bison -y
-# YACC = yacc
+# YACC = bison -y
+YACC ?= yacc
#
# Define the FLEX processor
# note - lex will not work
#
-FLEX = flex
+FLEX ?= flex
# Link in any necessary C++ libraries
#
@@ -50,21 +50,22 @@
# installation information
-BINDIR=/usr/local/bin
-MANDIR=/usr/local/man/man1
+PREFIX?=/usr/local
+BINDIR=$(PREFIX)/bin
+MANDIR=$(PREFIX)/man/man1
MANEXT=1
# other commands
-CP=cp -f
-MKDIR=mkdir
-MV=mv -f
-RM=rm -f
+CP?=cp -f
+MKDIR?=mkdir
+MV?=mv -f
+RM?=rm -f
# CFLAGS
-CFLAGS = -pipe -Iplatform -Ircxlib -Inqc -Icompiler -Wall -Wstrict-prototypes -Wmissing-prototypes
+CFLAGS += -Iplatform -Ircxlib -Inqc -Icompiler
-USBOBJ = rcxlib/RCX_USBTowerPipe_none.o
+USBOBJ = rcxlib/RCX_USBTowerPipe_fbsd.o
#
# Platform specific tweaks
@@ -78,9 +79,6 @@
ifeq ($TARGET),solaris)
# Solaris
CFLAGS += -DSOLARIS
-else
- # default - works for Linux
- CFLAGS += -O6
endif
endif
@@ -88,7 +86,7 @@
# wants to redefine the default serial name
#
ifndef DEFAULT_SERIAL_NAME
- DEFAULT_SERIAL_NAME = "/dev/ttyS0"
+ DEFAULT_SERIAL_NAME = "/dev/cuaa0"
endif
CFLAGS += -DDEFAULT_SERIAL_NAME='$(DEFAULT_SERIAL_NAME)'
@@ -140,10 +138,10 @@
$(MKDIR) bin
bin/nqc : compiler/parse.cpp $(OBJ)
- $(CC) -o $@ $(OBJ) $(LIBS)
+ $(CXX) -o $@ $(OBJ) $(LIBS)
bin/mkdata : mkdata/mkdata.cpp nqc/SRecord.cpp
- $(CC) -o bin/mkdata -Inqc/ -Iplatform/ mkdata/mkdata.cpp nqc/SRecord.cpp
+ $(CXX) -o bin/mkdata -Inqc/ -Iplatform/ mkdata/mkdata.cpp nqc/SRecord.cpp
#
# clean up stuff
@@ -203,7 +201,7 @@
# general rule for compiling
#
.cpp.o:
- $(CC) -c $(CFLAGS) $< -o $*.o
+ $(CXX) -c $(CFLAGS) $< -o $*.o
#
|