File: Makefile

package info (click to toggle)
osptoolkit 4.13.0-1.1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,376 kB
  • sloc: ansic: 42,300; makefile: 265; sh: 49
file content (63 lines) | stat: -rw-r--r-- 1,459 bytes parent folder | download | duplicates (4)
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
63
#
# OSP Test Applicatopn Makefile
#

# OSP direcory
INCDIR = ../include
LIBDIR = ../lib
BINDIR = ../bin

# OSP library
OSPLIB = -L$(LIBDIR) -losptk

# For OpenSSL:
SSLINCDIR = ../crypto
SSLLIBDIR = ../lib
SSLLIBS = -L$(SSLLIBDIR) -lssl -lcrypto

# Compiler tools
CC = g++

# WARNING !!
# If not using gcc for compiling the toolkit and instead using the Sun Compiler,
# please comment the line below for proper compilation.
GCCFLAGS = -Wall

# Macro definition
MFLAGS = -DOPENSSL_NO_KRB5 -D_POSIX_THREADS -D_REENTRANT -DOSP_SDK

# Debug flags
# This is for DEBUG mode of compilation
#DFLAGS = $(OSPTNLOGDEBUG) -g -DOSPC_DEBUG=1
# This is for PRODUCTION mode of compilation
DFLAGS = $(OSPTNLOGDEBUG) -O

# Compile flags
CFLAGS = $(MFLAGS) $(DFLAGS) $(GCCFLAGS) $(PROFILE)

# Include flags
IFLAGS = -I./ -I$(INCDIR) -I$(SSLINCDIR)

# Library flags
LIBS = $(OSPLIB) $(SSLLIBS) -lpthread -ldl -lm -lnsl -lsocket -lmtmalloc $(PROFILELIB)
LIBS_LINUX = $(OSPLIB) $(SSLLIBS) -lpthread -ldl -lm $(PROFILELIB)

################################################################################

TESTOBJS = nonblocking.o syncque.o test_app.o

TESTAPP = $(BINDIR)/test_app

.SUFFIXES: .o .c

.c.o:
	$(PURIFY) $(CC) $(CFLAGS) $(IFLAGS) -c $(<)

default: $(TESTOBJS)
	$(PURIFY) $(CC) -o $(TESTAPP) $(TESTOBJS) $(LFLAGS) $(LIBS) $(PROFILE)

linux: $(TESTOBJS)
	$(PURIFY) $(CC) -o $(TESTAPP) $(TESTOBJS) $(LFLAGS) $(LIBS_LINUX) $(PROFILE)

clean :
	rm -f $(TESTAPP) $(TESTOBJS)