summaryrefslogtreecommitdiff
path: root/Makefile.in
blob: 38b3e8f39e08625be6ff783a14458c3afe4c5347 (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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# Makefile.in
# $Modified: Thu Jan 22 11:55:32 1998 by brook $


## The C compiler

# What we use to compile C files.
# CC = cc
CC = @CC@

# The flags we use to compile C files.
CFLAGS = @CFLAGS@


## The C preprocessor.

# What we use for preprocessing.  (gcc -E -traditional-cpp)
CPP = @CPP_TRADITIONAL@

# Flags passed to the C preprocessor.  ()
CPPFLAGS = @CPPFLAGS@

# Definitions to be passed to the C preprocessor.  (-DHAVE_CONFIG_H)
DEFS = @DEFS@


## The Linker.

# Flags passed to the linker.  (-g -O)
LDFLAGS = @LDFLAGS@

# Use this for building statically linked executables with GCC.
# LDFLAGS = -static @LDFLAGS@


## Local libraries

# Math library (-lm)
LIBM       = @LIBM@
# C library (-lc)
LIBC       = @LIBC@

# All libraries shown above
LIBS = $(LIBM) $(LIBC)

# Network libraries
LIBNSL = @LIBNSL@
LIBSOCKET = @LIBSOCKET@
NETLIBS = $(LIBNSL) $(LIBSOCKET)

## X Libraries

# Special flags for linking with X.  (-L/usr/X11R5/lib)
X_LDFLAGS = @X_LIBS@

# Motif library.  (-lXm)
LIBXM = @XM_LIBS@

# Use this alternative for building `semistatic' executables
# where Motif libraries are statically linked in.
# LIBXM = -Wl,-Bstatic @XM_LIBS@ -Wl,-Bdynamic

# X extension library; needed for Athena and Motif >= 2.0.  (-lXext)
LIBXEXT = @XEXT_LIBS@

# Xpm library; needed for DDD and sometimes for Motif >= 2.0.  (-lXpm)
LIBXPM = @XPM_LIBS@

# Xp library; sometimes needed for Motif >= 2.1.  (-lXp)
LIBXP = @XP_LIBS@

# gen library; sometimes needed for Motif >= 2.0.  (-lgen)
LIBGEN = @LIBGEN@

# X toolkit library.  (-lXt)
LIBXT = @XT_LIBS@

# Xaw library.  (-lXaw)
LIBXAW = @XAW_LIBS@

# X library.  (-lSM -lICE -lX11 -lnsl -lsocket)
LIBX11 = @X_PRE_LIBS@ @X11_LIBS@ @X_EXTRA_LIBS@

# All libraries shown above
ALL_X_LIBS = $(X_LDFLAGS) $(LIBXM) $(LIBXP) $(LIBXPM) $(LIBXEXT) \
$(LIBXT) $(LIBX11) $(LIBGEN)


## C compile commands.
COMPILE.c = $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c
LINK.c = $(CC) $(LDFLAGS)
COMPILE_AND_LINK.c = \
    $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(LDFLAGS)

## Where to look for X include files.  (-I/usr/X11R5/include)
X_INCLUDE = @X_CFLAGS@

## Where to look for include files.
INCLUDE = -I. $(X_INCLUDE)

## Implicit rules.
.SUFFIXES: .c
.c.o:
	$(COMPILE.c) $(INCLUDE) -o $@ $<


## Libraries and object files
LIB_OBJECTS = netlib.o nmea_parse.o serial.o tm.o em.o $(MOTIF_OBJECTS)

## Programs
PROGRAMS=gpsd

## Motif dependent programs and object files
@MISSING_MOTIF@MOTIF_PROGRAMS=gps xgpsspeed
@MISSING_MOTIF@MOTIF_OBJECTS = display.o

XGPSOBJS=xgpsspeed.o Tachometer.o

all: $(PROGRAMS) $(MOTIF_PROGRAMS)

gpsd: gpsd.o libgpsd.a
	$(LINK.c) -o $@ gpsd.o -L. -lgpsd $(NETLIBS) $(LIBS)

gps: gps.o libgpsd.a
	$(LINK.c) -o $@ gps.o -L. -lgpsd $(ALL_X_LIBS) $(LIBS)

xgpsspeed: $(XGPSOBJS)
	$(LINK.c) -o $@ $(XGPSOBJS) -L. -lgpsd $(LIBXAW) $(ALL_X_LIBS) $(LIBS)

libgpsd.a:  $(LIB_OBJECTS)
	ar -r libgpsd.a $(LIB_OBJECTS)
	ranlib libgpsd.a

clean:
	rm -f *.o *.a gpsd gps *~ config.status

dist-clean: clean
	rm -f config.cache config.log