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,333 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 Enroll 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 = gcc

# 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 -DSOLARIS

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

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

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

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

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

ENOBJS = osptnepinit.o osptnepenroll.o osptnep.o osptneputil.o

ENROLL = $(BINDIR)/enroll

.SUFFIXES: .o .c

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

default: $(ENOBJS)
	$(PURIFY) $(CC) -o $(ENROLL) $(ENOBJS) $(LIBS)

linux: $(ENOBJS)
	$(PURIFY) $(CC) -o $(ENROLL) $(ENOBJS) $(LIBS_LINUX)

clean:
	rm -f $(ENROLL) $(ENOBJS)