Revision 975

trunk/contrib/GNUmakefile (revision 975)
16 16

  
17 17
all: contribs build-ad2csv
18 18

  
19
contribs: build-statslib build-ecolib build-qfclib build-sample
19
contribs: build-statslib build-ecolib build-qfclib build-contrib
20 20
ifneq ($(SHELL),sh.exe)
21 21
	$(AR) -rs $(DISK)/contrib/lib/libcontrib.a ../build/objects/dist/saflp-contrib-*.obj
22 22
	$(AR) -rs $(DISK)/contrib/lib/libcontribo.a ../build/objects/dist/optlp-contrib-*.obj
......
63 63
	$(MAKE) --directory=admb2r ADMB_HOME="$(ADMB_HOME)" gcc
64 64
endif
65 65

  
66
build-sample:
66
build-contrib:
67 67
ifneq ($(SHELL),sh.exe)
68
	$(MAKE) --directory=sample CXX=$(CXX) CXXFLAGS="-DOPT_LIB $(CXXFLAGS)" PREFIX_OBJ=$(LIBPATH)/optlp-contrib-sample-
69
	$(MAKE) --directory=sample CXX=$(CXX) CXXFLAGS="-DSAFE_ALL $(CXXFLAGS)" PREFIX_OBJ=$(LIBPATH)/saflp-contrib-sample-
68
	$(MAKE) --directory=src CXX=$(CXX) CXXFLAGS="-DOPT_LIB $(CXXFLAGS)" PREFIX_OBJ=$(LIBPATH)/optlp-contrib-
69
	$(MAKE) --directory=src CXX=$(CXX) CXXFLAGS="-DSAFE_ALL $(CXXFLAGS)" PREFIX_OBJ=$(LIBPATH)/saflp-contrib-
70 70
endif
71 71

  
72 72
test:
73
	$(MAKE) --directory=sample ADMB_HOME="$(ADMB_HOME)" test 
73
	$(MAKE) --directory=src ADMB_HOME="$(ADMB_HOME)" test 
74 74

  
75 75
test-needR:
76 76
	$(MAKE) --directory=ecolib ADMB_HOME="$(ADMB_HOME)" test
......
80 80
	@$(MAKE) --directory=ecolib clean
81 81
	@$(MAKE) --directory=qfclib clean
82 82
	@$(MAKE) --directory=statslib clean
83
	@$(MAKE) --directory=sample clean
83
	@$(MAKE) --directory=src clean
trunk/contrib/src/simple.dat (revision 975)
1
# number of observations
2
     10
3
# observed Y values
4
    1.4  4.7  5.1  8.3  9.0  14.5  14.0  13.4  19.2  18 
5
# observed x values
6
    -1  0 1  2  3  4  5  6  7  8        
7

  
trunk/contrib/src/contrib.cpp (revision 975)
1
#include <iostream>
2

  
3
void sample_hello_world()
4
{
5
  std::cout << "Hello World" << std::endl;
6
}
trunk/contrib/src/contrib.h (revision 975)
1
/*
2
 * $Id$
3
 *
4
 * Author:
5
 * Copyright (c) 2011 ADMB Foundation
6
 * 
7
 * License:
8
 *
9
 * ADModelbuilder and associated libraries and documentations are
10
 * provided under the general terms of the "New BSD" license
11
 * 
12
 * Redistribution and use in source and binary forms, with or without
13
 * modification, are permitted provided that the following conditions are
14
 * met:
15
 * 
16
 * 1. Redistributions of source code must retain the above copyright
17
 * notice, this list of conditions and the following disclaimer.
18
 * 
19
 * 2.  Redistributions in binary form must reproduce the above copyright
20
 * notice, this list of conditions and the following disclaimer in the
21
 * documentation and/or other materials provided with the distribution.
22
 * 
23
 * 3.  Neither the name of the  University of California, Otter Research,
24
 * nor the ADMB Foundation nor the names of its contributors may be used
25
 * to endorse or promote products derived from this software without
26
 * specific prior written permission.
27
 * 
28
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff