1 # Makefile for the second extended file system utility functions
3 # Copyright (C) 1993 Remy Card (card@masi.ibp.fr)
5 # This file can be redistributed under the terms of the GNU General
9 top_srcdir = @top_srcdir@
19 SMANPAGES= libuuid.3 uuid_clear.3 uuid_compare.3 uuid_copy.3 \
20 uuid_generate.3 uuid_is_null.3 uuid_parse.3 \
21 uuid_time.3 uuid_unparse.3
34 SRCS= $(srcdir)/clear.c \
37 $(srcdir)/gen_uuid.c \
48 DLL_ADDRESS = 0x67900000
55 DLL_INSTALL_DIR = $(root_libdir)
61 ELF_INSTALL_DIR = $(root_libdir)
65 BSDLIB_IMAGE = libuuid
67 BSDLIB_INSTALL_DIR = $(root_libdir)
77 $(CC) $(ALL_CFLAGS) -c $< -o $@
78 @PROFILE_CMT@ $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $<
79 @CHECKER_CMT@ $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $<
80 @DLL_CMT@ (export JUMP_DIR=`pwd`/jump; $(CC) -B$(JUMP_PREFIX) $(ALL_CFLAGS) \
81 @DLL_CMT@ -o jump/$*.o -c $<)
82 @ELF_CMT@ $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $<
83 @BSDLIB_CMT@ $(CC) $(ALL_CFLAGS) -fpic -o pic/$*.o -c $<
85 all:: tst_uuid uuid_time $(SMANPAGES)
87 tst_uuid.o: $(srcdir)/tst_uuid.c
88 $(CC) $(ALL_CFLAGS) -c $(srcdir)/tst_uuid.c -o tst_uuid.o
90 tst_uuid: tst_uuid.o $(DEPLIBUUID)
91 $(CC) $(ALL_LDFLAGS) -o tst_uuid tst_uuid.o $(LIBUUID)
93 uuid_time: $(srcdir)/uuid_time.c $(DEPLIBUUID)
94 $(CC) $(ALL_CFLAGS) -DDEBUG $(srcdir)/uuid_time.c -c -o uuid_time.o
95 $(CC) -o uuid_time uuid_time.o $(LIBUUID)
98 libuuid.3: $(DEP_SUBSTITUTE) $(srcdir)/libuuid.3.in
99 $(SUBSTITUTE) $(srcdir)/libuuid.3.in libuuid.3
101 uuid_clear.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_clear.3.in
102 $(SUBSTITUTE) $(srcdir)/uuid_clear.3.in uuid_clear.3
104 uuid_compare.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_compare.3.in
105 $(SUBSTITUTE) $(srcdir)/uuid_compare.3.in uuid_compare.3
107 uuid_copy.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_copy.3.in
108 $(SUBSTITUTE) $(srcdir)/uuid_copy.3.in uuid_copy.3
110 uuid_generate.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_generate.3.in
111 $(SUBSTITUTE) $(srcdir)/uuid_generate.3.in uuid_generate.3
113 uuid_is_null.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_is_null.3.in
114 $(SUBSTITUTE) $(srcdir)/uuid_is_null.3.in uuid_is_null.3
116 uuid_parse.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_parse.3.in
117 $(SUBSTITUTE) $(srcdir)/uuid_parse.3.in uuid_parse.3
119 uuid_time.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_time.3.in
120 $(SUBSTITUTE) $(srcdir)/uuid_time.3.in uuid_time.3
122 uuid_unparse.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_unparse.3.in
123 $(SUBSTITUTE) $(srcdir)/uuid_unparse.3.in uuid_unparse.3
126 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
127 $(DESTDIR)$(includedir)/uuid $(DESTDIR)$(man3dir)
129 install:: all installdirs
130 $(INSTALL_DATA) libuuid.a $(DESTDIR)$(libdir)/libuuid.a
131 $(CHMOD) 644 $(DESTDIR)$(libdir)/libuuid.a
132 -$(RANLIB) $(DESTDIR)$(libdir)/libuuid.a
133 $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libuuid.a
134 $(INSTALL_DATA) $(srcdir)/uuid.h $(DESTDIR)$(includedir)/uuid/uuid.h
135 for i in $(SMANPAGES); do \
136 $(INSTALL_DATA) $$i $(DESTDIR)$(man3dir)/$$i; \
140 $(RM) -f $(DESTDIR)$(libdir)/libuuid.a
141 for i in $(SMANPAGES); do \
142 $(RM) -f $(DESTDIR)$(man3dir)/$$i; \
146 $(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* checker/*
147 $(RM) -f ../libuuid.a ../libuuid_p.a tst_uuid uuid_time $(SMANPAGES)
150 LD_LIBRARY_PATH=$(LIB) ./tst_uuid
154 $(RM) -f .depend Makefile $(srcdir)/TAGS $(srcdir)/Makefile.in.old
157 # Hack to parallel makes recognize dependencies correctly.
159 ../../lib/libuuid.a: libuuid.a
160 ../../lib/libuuid.so: image
162 # +++ Dependency line eater +++
164 # Makefile dependencies follow. This must be the last section in
165 # the Makefile.in file
167 clear.o: $(srcdir)/clear.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
168 compare.o: $(srcdir)/compare.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
169 copy.o: $(srcdir)/copy.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
170 gen_uuid.o: $(srcdir)/gen_uuid.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
171 isnull.o: $(srcdir)/isnull.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
172 pack.o: $(srcdir)/pack.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
173 parse.o: $(srcdir)/parse.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
174 unpack.o: $(srcdir)/unpack.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
175 unparse.o: $(srcdir)/unparse.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
176 uuid_time.o: $(srcdir)/uuid_time.c $(srcdir)/uuidP.h $(srcdir)/uuid.h