~ubuntu-branches/ubuntu/oneiric/osptoolkit/oneiric

« back to all changes in this revision

Viewing changes to test/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): TransNexus, Inc.
  • Date: 2007-12-30 20:37:26 UTC
  • Revision ID: james.westby@ubuntu.com-20071230203726-dysah2e93yqd3vbp
Tags: upstream-3.4.2
ImportĀ upstreamĀ versionĀ 3.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# OSP Test Applicatopn Makefile
 
3
#
 
4
 
 
5
# OSP direcory
 
6
INCDIR = ../include
 
7
LIBDIR = ../lib
 
8
BINDIR = ../bin
 
9
 
 
10
# OSP library
 
11
OSPLIB = -L$(LIBDIR) -losptk
 
12
 
 
13
# For OpenSSL:
 
14
SSLINCDIR = ../crypto
 
15
SSLLIBDIR = ../lib
 
16
SSLLIBS = -L$(SSLLIBDIR) -lssl -lcrypto
 
17
 
 
18
# Compiler tools
 
19
CC = g++
 
20
 
 
21
# WARNING !!
 
22
# If not using gcc for compiling the toolkit and instead using the Sun Compiler,
 
23
# please comment the line below for proper compilation.
 
24
GCCFLAGS = -Wall
 
25
 
 
26
# Macro definition
 
27
MFLAGS = -DOPENSSL_NO_KRB5 -D_POSIX_THREADS -D_REENTRANT -DOSP_SDK
 
28
 
 
29
# Debug flags
 
30
# This is for DEBUG mode of compilation
 
31
#DFLAGS = $(OSPTNLOGDEBUG) -g -DOSPC_DEBUG=1
 
32
# This is for PRODUCTION mode of compilation
 
33
DFLAGS = $(OSPTNLOGDEBUG) -O
 
34
 
 
35
# Compile flags
 
36
CFLAGS = $(MFLAGS) $(DFLAGS) $(GCCFLAGS) $(PROFILE)
 
37
 
 
38
# Include flags
 
39
IFLAGS = -I./ -I$(INCDIR) -I$(SSLINCDIR)
 
40
 
 
41
# Library flags
 
42
LIBS = $(OSPLIB) $(SSLLIBS) -lpthread -ldl -lm -lnsl -lsocket -lmtmalloc $(PROFILELIB)
 
43
LIBS_LINUX = $(OSPLIB) $(SSLLIBS) -lpthread -ldl -lm $(PROFILELIB)
 
44
 
 
45
################################################################################
 
46
 
 
47
TESTOBJS = nonblocking.o syncque.o test_app.o
 
48
 
 
49
TESTAPP = $(BINDIR)/test_app
 
50
 
 
51
.SUFFIXES: .o .c
 
52
 
 
53
.c.o:
 
54
        $(PURIFY) $(CC) $(CFLAGS) $(IFLAGS) -c $(<)
 
55
 
 
56
default: $(TESTOBJS)
 
57
        $(PURIFY) $(CC) -o $(TESTAPP) $(TESTOBJS) $(LFLAGS) $(LIBS) $(PROFILE)
 
58
 
 
59
linux: $(TESTOBJS)
 
60
        $(PURIFY) $(CC) -o $(TESTAPP) $(TESTOBJS) $(LFLAGS) $(LIBS_LINUX) $(PROFILE)
 
61
 
 
62
clean :
 
63
        rm -f $(TESTAPP) $(TESTOBJS)