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 $(LIBUUID)
91 $(CC) $(ALL_LDFLAGS) -o tst_uuid tst_uuid.o $(LIBUUID)
93 uuid_time: $(srcdir)/uuid_time.c $(LIBUUID)
94 $(CC) $(ALL_CFLAGS) -DDEBUG $(srcdir)/uuid_time.c -o uuid_time $(LIBUUID)
96 libuuid.3: $(DEP_SUBSTITUTE) $(srcdir)/libuuid.3.in
97 $(SUBSTITUTE) $(srcdir)/libuuid.3.in libuuid.3
99 uuid_clear.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_clear.3.in
100 $(SUBSTITUTE) $(srcdir)/uuid_clear.3.in uuid_clear.3
102 uuid_compare.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_compare.3.in
103 $(SUBSTITUTE) $(srcdir)/uuid_compare.3.in uuid_compare.3
105 uuid_copy.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_copy.3.in
106 $(SUBSTITUTE) $(srcdir)/uuid_copy.3.in uuid_copy.3
108 uuid_generate.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_generate.3.in
109 $(SUBSTITUTE) $(srcdir)/uuid_generate.3.in uuid_generate.3
111 uuid_is_null.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_is_null.3.in
112 $(SUBSTITUTE) $(srcdir)/uuid_is_null.3.in uuid_is_null.3
114 uuid_parse.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_parse.3.in
115 $(SUBSTITUTE) $(srcdir)/uuid_parse.3.in uuid_parse.3
117 uuid_time.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_time.3.in
118 $(SUBSTITUTE) $(srcdir)/uuid_time.3.in uuid_time.3
120 uuid_unparse.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_unparse.3.in
121 $(SUBSTITUTE) $(srcdir)/uuid_unparse.3.in uuid_unparse.3
124 $(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
125 $(DESTDIR)$(includedir)/uuid $(DESTDIR)$(man3dir)
127 install:: all installdirs
128 $(INSTALL_DATA) libuuid.a $(DESTDIR)$(libdir)/libuuid.a
129 $(CHMOD) 644 $(DESTDIR)$(libdir)/libuuid.a
130 -$(RANLIB) $(DESTDIR)$(libdir)/libuuid.a
131 $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libuuid.a
132 $(INSTALL_DATA) $(srcdir)/uuid.h $(DESTDIR)$(includedir)/uuid/uuid.h
133 for i in $(SMANPAGES); do \
134 $(INSTALL_DATA) $$i $(DESTDIR)$(man3dir)/$$i; \
138 $(RM) -f $(DESTDIR)$(libdir)/libuuid.a
139 for i in $(SMANPAGES); do \
140 $(RM) -f $(DESTDIR)$(man3dir)/$$i; \
144 $(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* checker/*
145 $(RM) -f ../libuuid.a ../libuuid_p.a tst_uuid uuid_time $(SMANPAGES)
148 LD_LIBRARY_PATH=$(LIB) ./tst_uuid
152 $(RM) -f .depend Makefile
154 # +++ Dependency line eater +++
156 # Makefile dependencies follow. This must be the last section in
157 # the Makefile.in file
159 clear.o: $(srcdir)/clear.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
160 compare.o: $(srcdir)/compare.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
161 copy.o: $(srcdir)/copy.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
162 gen_uuid.o: $(srcdir)/gen_uuid.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
163 isnull.o: $(srcdir)/isnull.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
164 pack.o: $(srcdir)/pack.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
165 parse.o: $(srcdir)/parse.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
166 unpack.o: $(srcdir)/unpack.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
167 unparse.o: $(srcdir)/unparse.c $(srcdir)/uuidP.h $(srcdir)/uuid.h
168 uuid_time.o: $(srcdir)/uuid_time.c $(srcdir)/uuidP.h $(srcdir)/uuid.h