File: Makefile

package info (click to toggle)
ocfs2-tools 1.8.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 6,232 kB
  • sloc: ansic: 86,865; sh: 5,781; python: 2,380; makefile: 1,305
file content (121 lines) | stat: -rw-r--r-- 2,122 bytes parent folder | download | duplicates (3)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
TOPDIR = ..

include $(TOPDIR)/Preamble.make

INCLUDES = -I$(TOPDIR)/include

LIBRARIES = libocfs2.a

LIBO2DLM_LIBS = -L$(TOPDIR)/libo2dlm -lo2dlm $(DL_LIBS)
LIBO2DLM_DEPS = $(TOPDIR)/libo2dlm/libo2dlm.a

ifneq ($(BUILD_FSDLM_SUPPORT),)
LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb -ldlm_lt
else
LIBO2CB_LIBS = -L$(TOPDIR)/libo2cb -lo2cb
endif
LIBO2CB_DEPS = $(TOPDIR)/libo2cb/libo2cb.a

CFLAGS += -fPIC

ifneq ($(OCFS2_DEBUG_EXE),)
DEBUG_EXE_FILES = $(shell awk '/DEBUG_EXE/{if (k[FILENAME] == 0) {print FILENAME; k[FILENAME] = 1;}}' $(CFILES))
DEBUG_EXE_PROGRAMS = $(addprefix debug_,$(subst .c,,$(DEBUG_EXE_FILES)))

.SECONDARY:

UNINST_PROGRAMS += $(DEBUG_EXE_PROGRAMS)

debug_%.o : %.c 
	$(CC) $(CFLAGS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(LOCAL_CPPFLAGS) \
		$(INCLUDES) $(DEFINES) \
		-DDEBUG_EXE -o $@ -c $<

debug_%: debug_%.o libocfs2.a $(LIBO2DLM_DEPS) $(LIBO2CB_DEPS)
	$(LINK) $(COM_ERR_LIBS) $(LIBO2DLM_LIBS) $(LIBO2CB_LIBS)

endif

CFILES = 		\
	alloc.c		\
	bitmap.c	\
	bitops.c	\
	blockcheck.c	\
	blocktype.c	\
	cached_inode.c	\
	chain.c		\
	chainalloc.c	\
	checkhb.c	\
	closefs.c	\
	dirblock.c	\
	dir_iterate.c	\
	dir_scan.c	\
	dlm.c		\
	fileio.c	\
	freefs.c	\
	expanddir.c	\
	extend_file.c	\
	extents.c	\
	extent_map.c	\
	getsectsize.c	\
	getsize.c	\
	heartbeat.c	\
	inode.c		\
	inode_scan.c	\
	ismounted.c	\
	kernel-rbtree.c	\
	link.c		\
	lookup.c	\
	memory.c	\
	mkjournal.c	\
	namei.c		\
	openfs.c	\
	slot_map.c	\
	sysfile.c	\
	truncate.c	\
	unix_io.c	\
	unlink.c	\
	lockid.c	\
	backup_super.c	\
	feature_string.c\
	quota.c		\
	image.c		\
	xattr.c		\
	extent_tree.c	\
	refcount.c	\
	dir_indexed.c

HFILES =		\
	bitmap.h	\
	crc32table.h	\
	dir_iterate.h	\
	dir_util.h	\
	extent_map.h	\
	extent_tree.h	\
	refcount.h

HFILES_GEN = ocfs2_err.h

OBJS = $(subst .c,.o,$(CFILES)) \
	ocfs2_err.o

$(OBJS): $(HFILES_GEN)

ocfs2_err.c ocfs2_err.h: ocfs2_err.et
	compile_et ocfs2_err.et

libocfs2.a: $(OBJS)
	rm -f $@
	$(AR) r $@ $^
	$(RANLIB) $@

MANS = ocfs2.7

DIST_FILES = $(CFILES) $(HFILES) ocfs2_err.et ocfs2.7.in

CLEAN_RULES = clean-err

clean-err:
	rm -f ocfs2_err.c ocfs2_err.h

include $(TOPDIR)/Postamble.make