# 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 = gcc # The flags we use to compile C files. CFLAGS = ## The C preprocessor. # What we use for preprocessing. (gcc -E -traditional-cpp) CPP = @CPP_TRADITIONAL@ # Flags passed to the C preprocessor. () CPPFLAGS = # Definitions to be passed to the C preprocessor. (-DHAVE_CONFIG_H) DEFS = -DHAVE_CONFIG_H ## The Linker. # Flags passed to the linker. (-g -O) LDFLAGS = # Use this for building statically linked executables with GCC. # LDFLAGS = -static ## Local libraries # Math library (-lm) LIBM = -lm # C library (-lc) LIBC = -lc # All libraries shown above LIBS = $(LIBM) $(LIBC) # Network libraries LIBNSL = -lnsl LIBSOCKET = NETLIBS = $(LIBNSL) $(LIBSOCKET) ## 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 include files. INCLUDE = -I. ## 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 ## Programs PROGRAMS=gpsd all: $(PROGRAMS) gpsd: gpsd.o libgpsd.a $(LINK.c) -o $@ gpsd.o -L. -lgpsd $(NETLIBS) $(LIBS) libgpsd.a: $(LIB_OBJECTS) ar -r libgpsd.a $(LIB_OBJECTS) ranlib libgpsd.a clean: rm -f *.o *.a gpsd gps *~ config.status distclean: clean rm -f config.cache config.log