Revision 1438 trunk/contrib/GNUmakefile

GNUmakefile (revision 1438)
1
ifeq ($(SHELL),sh.exe)
2
  OBJS_DIR=..\..\build\objects\dist
3
  OBJS_DIR:=$(addsuffix \,$(OBJS_DIR))
4
  OBJS_DIR2=..\build\objects\dist
5
  OBJS_DIR2:=$(addsuffix \,$(OBJS_DIR2))
6
  ifndef DIST
7
    DIST=..\build\dist
1
ifeq ($(OS),Windows_NT)
2
  ifeq (sh.exe,$(findstring sh.exe,$(SHELL)))
3
    SHELL = cmd
4
    PATH:=..\..\utilities\mingw\bin;..\utilities\mingw\bin;$(PATH)
5
  else
6
    ifneq ($(TERM),xterm)
7
      PATH:=../../utilities/mingw/bin:../utilities/mingw/bin:$(PATH)
8
    endif
8 9
  endif
9
  CONTRIB_DIR=..\$(addsuffix \contrib,$(DIST))
10
  CONTRIB_LIB=$(addsuffix \contrib\lib\,$(DIST))
10
endif
11
ifeq ($(SHELL),cmd)
12
  CONTRIB_OBJS_DIR=..\..\build\objects\contrib
13
  CONTRIB_DIR=..\..\build\dist\contrib
14
  CONTRIB_BIN=$(addsuffix \bin,$(CONTRIB_DIR))
15
  CONTRIB_INCLUDE=$(addsuffix \include,$(CONTRIB_DIR))
16
  CONTRIB_LIB=$(addsuffix \lib,$(CONTRIB_DIR))
11 17
else
12
  OBJS_DIR=../../build/objects/dist/
13
  OBJS_DIR2=../build/objects/dist/
14
  ifndef DIST
15
    DIST=../build/dist
16
  endif
17
  CONTRIB_DIR=../$(addsuffix /contrib,$(DIST))
18
  CONTRIB_LIB=$(addsuffix /contrib/lib/,$(DIST))
18
  CONTRIB_OBJS_DIR=../../build/objects/contrib
19
  CONTRIB_DIR=../../build/dist/contrib
20
  CONTRIB_BIN=$(addsuffix /bin,$(CONTRIB_DIR))
21
  CONTRIB_INCLUDE=$(addsuffix /include,$(CONTRIB_DIR))
22
  CONTRIB_LIB=$(addsuffix /lib,$(CONTRIB_DIR))
19 23
endif
20 24

  
21
all: contrib-libs contrib-ad2csv
25
all: 
26
	$(MAKE) contrib-includes
27
	$(MAKE) contrib-libs
28
	$(MAKE) contrib-ad2csv
22 29

  
30
contrib-includes: contrib-dirs
31
	@$(MAKE) --directory=ecolib CONTRIB_INCLUDE=$(CONTRIB_INCLUDE) includes
32
	@$(MAKE) --directory=gdbprintlib CONTRIB_INCLUDE=$(CONTRIB_INCLUDE) includes
33
	@$(MAKE) --directory=qfclib CONTRIB_INCLUDE=$(CONTRIB_INCLUDE) includes
34
	@$(MAKE) --directory=statslib CONTRIB_INCLUDE=$(CONTRIB_INCLUDE) includes
35
	@$(MAKE) --directory=src CONTRIB_INCLUDE=$(CONTRIB_INCLUDE) includes
36

  
23 37
contrib-libs: contrib-ecolib contrib-gdbprintlib contrib-qfclib contrib-statslib contrib-src
24
	$(AR) -rs $(CONTRIB_LIB)libcontrib.a $(OBJS_DIR2)saflp-contrib-*.obj
25
	$(AR) -rs $(CONTRIB_LIB)libcontribo.a $(OBJS_DIR2)optlp-contrib-*.obj
38
ifeq ($(SHELL),cmd)
39
	$(AR) -rs src\$(CONTRIB_LIB)\libcontrib.a src\$(CONTRIB_OBJS_DIR)\saflp-contrib-*.obj
40
	$(AR) -rs src\$(CONTRIB_LIB)\libcontribo.a src\$(CONTRIB_OBJS_DIR)\optlp-contrib-*.obj
41
else
42
	$(AR) -rs src/$(CONTRIB_LIB)/libcontrib.a src/$(CONTRIB_OBJS_DIR)/saflp-contrib-*.obj
43
	$(AR) -rs src/$(CONTRIB_LIB)/libcontribo.a src/$(CONTRIB_OBJS_DIR)/optlp-contrib-*.obj
44
endif
26 45

  
46
contrib-ad2csv: contrib-dirs
47
	$(MAKE) --directory=ad2csv CONTRIB_BIN=$(CONTRIB_BIN)
48

  
27 49
contrib-ecolib:
28
	$(MAKE) --directory=ecolib PREFIX=$(OBJS_DIR)saflp-$@- CONTRIB_DIR=$(CONTRIB_DIR)
29
	$(MAKE) --directory=ecolib OPTION=-f PREFIX=$(OBJS_DIR)optlp-$@- CONTRIB_DIR=$(CONTRIB_DIR)
50
	$(MAKE) --directory=ecolib CONTRIB_OBJS_DIR=$(CONTRIB_OBJS_DIR)
30 51

  
31 52
contrib-gdbprintlib:
32
	$(MAKE) --directory=gdbprintlib PREFIX=$(OBJS_DIR)saflp-$@- CONTRIB_DIR=$(CONTRIB_DIR)
33
	$(MAKE) --directory=gdbprintlib OPTION=-f PREFIX=$(OBJS_DIR)optlp-$@- CONTRIB_DIR=$(CONTRIB_DIR)
53
	$(MAKE) --directory=gdbprintlib CONTRIB_OBJS_DIR=$(CONTRIB_OBJS_DIR)
34 54

  
35 55
contrib-qfclib:
36
	$(MAKE) --directory=qfclib PREFIX=$(OBJS_DIR)saflp-$@- CONTRIB_DIR=$(CONTRIB_DIR)
37
	$(MAKE) --directory=qfclib OPTION=-f PREFIX=$(OBJS_DIR)optlp-$@- CONTRIB_DIR=$(CONTRIB_DIR)
56
	$(MAKE) --directory=qfclib CONTRIB_OBJS_DIR=$(CONTRIB_OBJS_DIR)
38 57

  
39 58
contrib-statslib:
40
	$(MAKE) --directory=statslib PREFIX=$(OBJS_DIR)saflp-$@- CONTRIB_DIR=$(CONTRIB_DIR)
41
	$(MAKE) --directory=statslib OPTION=-f PREFIX=$(OBJS_DIR)optlp-$@- CONTRIB_DIR=$(CONTRIB_DIR)
59
	$(MAKE) --directory=statslib CONTRIB_OBJS_DIR=$(CONTRIB_OBJS_DIR)
42 60

  
43 61
contrib-src:
44
	$(MAKE) --directory=src PREFIX=$(OBJS_DIR)saflp-$@- CONTRIB_DIR=$(CONTRIB_DIR)
45
	$(MAKE) --directory=src OPTION=-f PREFIX=$(OBJS_DIR)optlp-$@- CONTRIB_DIR=$(CONTRIB_DIR)
62
	$(MAKE) --directory=src CONTRIB_OBJS_DIR=$(CONTRIB_OBJS_DIR)
46 63

  
47
contrib-ad2csv:
48
	$(MAKE) --directory=ad2csv OPTION=-f
64
contrib-dirs:
65
ifeq ($(SHELL),cmd)
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff