File: Makefile

package info (click to toggle)
grass 6.0.2-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 40,044 kB
  • ctags: 31,303
  • sloc: ansic: 321,125; tcl: 25,676; sh: 11,176; cpp: 10,098; makefile: 5,025; fortran: 1,846; yacc: 493; lex: 462; perl: 133; sed: 1
file content (62 lines) | stat: -rw-r--r-- 1,816 bytes parent folder | download | duplicates (2)
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
MODULE_TOPDIR = ../../..

EXTRA_LIBS=$(GISLIB) $(RTREELIB)

LIB_NAME = $(DIG2_LIBNAME)

LIB_OBJS = \
    allocation.o  \
    angle.o  \
    box.o  \
    cindex.o  \
    cindex_rw.o  \
    file.o \
    frmt.o \
    head.o \
    inside.o \
    linecros.o \
    line_dist.o \
    list.o \
    plus.o \
    plus_area.o  \
    plus_line.o \
    plus_node.o \
    plus_struct.o \
    poly.o \
    portable.o \
    prune.o \
    spindex.o  \
    spindex_rw.o  \
    struct_alloc.o \
    type.o \
    update.o


include $(MODULE_TOPDIR)/include/Make/Lib.make

EXTRA_CLEAN_FILES = $(ARCH_INCDIR)/portable.h
EXTRA_INC = $(VECT_INC)
EXTRA_CFLAGS = $(VECT_CFLAGS)
DEPENDENCIES =  $(GRASS_INCDIR)/vect/dig_defines.h \
                $(GRASS_INCDIR)/vect/dig_macros.h $(GRASS_INCDIR)/vect/dig_structs.h \
                $(GRASS_INCDIR)/vect/dig_externs.h $(GRASS_INCDIR)/vect/dig_globs.h $(GISDEP)

default: $(ARCH_INCDIR)/portable.h lib $(OBJDIR)/test

#  Test the machine size and orientation for the Portable Library
$(ARCH_INCDIR)/portable.h: $(DEPENDENCIES)
	@test -d $(OBJDIR) || $(MKDIR) $(OBJDIR)
	$(CC) $(LDFLAGS) $(COMPILE_FLAGS) $(VECT_CFLAGS) $(INC) $(VECT_INC) -o $(OBJDIR)/port_test port_test.c
	echo "/* Architecture: $(ARCH) */" > $(ARCH_INCDIR)/portable.h
	$(OBJDIR)/port_test >> $(ARCH_INCDIR)/portable.h
	echo "/* Architecture: $(ARCH) */" > $(ARCH_DISTDIR)/include/portable.h
	$(OBJDIR)/port_test >> $(ARCH_DISTDIR)/include/portable.h
	

#  Test portable read/write functions
$(OBJDIR)/test: test.c $(DEPENDENCIES) $(ARCH_LIB_OBJS)
	$(CC) $(LDFLAGS) $(COMPILE_FLAGS) $(VECT_CFLAGS) $(INC) $(VECT_INC) -o $@ test.c $(DIG2LIB) $(RTREELIB) \
				$(GISLIB) $(DATETIMELIB) $(MATHLIB) $(XDRLIB) 
	cd $(OBJDIR); $(LD_LIBRARY_PATH_VAR)="$($(LD_LIBRARY_PATH_VAR)):$(GISBASE)/lib" ./test; diff ./test.tmp ../test.ok