1# Makefile for the UUID library 2# 3 4srcdir = @srcdir@ 5top_srcdir = @top_srcdir@ 6VPATH = @srcdir@ 7top_builddir = ../.. 8my_dir = lib/uuid 9INSTALL = @INSTALL@ 10 11@MCONFIG@ 12 13all:: 14 15SMANPAGES= uuid.3 uuid_clear.3 uuid_compare.3 uuid_copy.3 \ 16 uuid_generate.3 uuid_is_null.3 uuid_parse.3 \ 17 uuid_time.3 uuid_unparse.3 18 19OBJS= clear.o \ 20 compare.o \ 21 copy.o \ 22 gen_uuid.o \ 23 isnull.o \ 24 pack.o \ 25 parse.o \ 26 unpack.o \ 27 unparse.o \ 28 uuid_time.o 29 30SRCS= $(srcdir)/clear.c \ 31 $(srcdir)/compare.c \ 32 $(srcdir)/copy.c \ 33 $(srcdir)/gen_uuid.c \ 34 $(srcdir)/isnull.c \ 35 $(srcdir)/pack.c \ 36 $(srcdir)/parse.c \ 37 $(srcdir)/unpack.c \ 38 $(srcdir)/unparse.c \ 39 $(srcdir)/uuid_time.c 40 41LIBRARY= libuuid 42LIBDIR= uuid 43 44ELF_VERSION = 1.2 45ELF_SO_VERSION = 1 46ELF_IMAGE = libuuid 47ELF_MYDIR = uuid 48ELF_INSTALL_DIR = $(root_libdir) 49ELF_OTHER_LIBS = 50 51BSDLIB_VERSION = 1.1 52BSDLIB_IMAGE = libuuid 53BSDLIB_MYDIR = uuid 54BSDLIB_INSTALL_DIR = $(root_libdir) 55 56@MAKEFILE_LIBRARY@ 57@MAKEFILE_ELF@ 58@MAKEFILE_BSDLIB@ 59@MAKEFILE_PROFILE@ 60@MAKEFILE_CHECKER@ 61 62.c.o: 63 $(E) " CC $<" 64 $(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@ 65@PROFILE_CMT@ $(Q) $(CC) $(ALL_CFLAGS) -g -pg -o profiled/$*.o -c $< 66@CHECKER_CMT@ $(Q) $(CC) $(ALL_CFLAGS) -checker -g -o checker/$*.o -c $< 67@ELF_CMT@ $(Q) $(CC) $(ALL_CFLAGS) -fPIC -o elfshared/$*.o -c $< 68@BSDLIB_CMT@ $(Q) $(CC) $(ALL_CFLAGS) $(BSDLIB_PIC_FLAG) -o pic/$*.o -c $< 69 70all:: tst_uuid uuid_time $(SMANPAGES) uuid.pc 71 72uuid.h: $(srcdir)/uuid.h.in 73 $(E) " CP $@" 74 $(Q) cp $(srcdir)/uuid.h.in uuid.h 75 76$(top_builddir)/lib/uuid/uuid_types.h: $(srcdir)/uuid_types.h.in $(top_builddir)/config.status 77 cd $(top_builddir); CONFIG_FILES=$(my_dir)/uuid_types.h ./config.status 78 79tst_uuid.o: $(srcdir)/tst_uuid.c 80 $(E) " CC $@" 81 $(Q) $(CC) $(ALL_CFLAGS) -c $(srcdir)/tst_uuid.c -o tst_uuid.o 82 83tst_uuid: tst_uuid.o $(DEPSTATIC_LIBUUID) 84 $(E) " LD $@" 85 $(Q) $(CC) $(ALL_LDFLAGS) -o tst_uuid tst_uuid.o $(STATIC_LIBUUID) 86 87uuid_time: $(srcdir)/uuid_time.c $(DEPLIBUUID) 88 $(E) " LD $@" 89 $(Q) $(CC) $(ALL_CFLAGS) -DDEBUG -o uuid_time $(srcdir)/uuid_time.c \ 90 $(LIBUUID) 91 92uuid.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid.3.in 93 $(E) " SUBST $@" 94 $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid.3.in uuid.3 95 96uuid_clear.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_clear.3.in 97 $(E) " SUBST $@" 98 $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid_clear.3.in uuid_clear.3 99 100uuid_compare.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_compare.3.in 101 $(E) " SUBST $@" 102 $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid_compare.3.in uuid_compare.3 103 104uuid_copy.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_copy.3.in 105 $(E) " SUBST $@" 106 $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid_copy.3.in uuid_copy.3 107 108uuid_generate.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_generate.3.in 109 $(E) " SUBST $@" 110 $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid_generate.3.in uuid_generate.3 111 112uuid_is_null.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_is_null.3.in 113 $(E) " SUBST $@" 114 $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid_is_null.3.in uuid_is_null.3 115 116uuid_parse.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_parse.3.in 117 $(E) " SUBST $@" 118 $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid_parse.3.in uuid_parse.3 119 120uuid_time.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_time.3.in 121 $(E) " SUBST $@" 122 $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid_time.3.in uuid_time.3 123 124uuid_unparse.3: $(DEP_SUBSTITUTE) $(srcdir)/uuid_unparse.3.in 125 $(E) " SUBST $@" 126 $(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/uuid_unparse.3.in uuid_unparse.3 127 128uuid.pc: $(srcdir)/uuid.pc.in $(top_builddir)/config.status 129 $(E) " CONFIG.STATUS $@" 130 $(Q) cd $(top_builddir); CONFIG_FILES=lib/uuid/uuid.pc ./config.status 131 132installdirs:: 133 $(E) " MKINSTALLDIRS $(libdir) $(includedir)/uuid $(man3dir)" 134 $(Q) $(MKINSTALLDIRS) $(DESTDIR)$(libdir) \ 135 $(DESTDIR)$(includedir)/uuid $(DESTDIR)$(man3dir) \ 136 $(DESTDIR)$(libdir)/pkgconfig 137 138install:: all installdirs 139 $(E) " INSTALL_DATA $(libdir)/libuuid.a" 140 $(Q) $(INSTALL_DATA) libuuid.a $(DESTDIR)$(libdir)/libuuid.a 141 -$(Q) $(RANLIB) $(DESTDIR)$(libdir)/libuuid.a 142 $(Q) $(CHMOD) $(LIBMODE) $(DESTDIR)$(libdir)/libuuid.a 143 $(E) " INSTALL_DATA $(includedir)/uuid/uuid.h" 144 $(Q) $(INSTALL_DATA) uuid.h $(DESTDIR)$(includedir)/uuid/uuid.h 145 $(Q) for i in $(SMANPAGES); do \ 146 $(RM) -f $(DESTDIR)$(man3dir)/$$i.gz; \ 147 echo " INSTALL_DATA $(man3dir)/$$i"; \ 148 $(INSTALL_DATA) $$i $(DESTDIR)$(man3dir)/$$i; \ 149 done 150 $(Q) $(RM) -f $(DESTDIR)$(man3dir)/uuid_generate_random.3.gz \ 151 $(DESTDIR)$(man3dir)/uuid_generate_time.3.gz 152 $(E) " LINK $(man3dir)/uuid_generate_random.3" 153 $(Q) (cd $(DESTDIR)$(man3dir); \ 154 $(LN) $(LINK_INSTALL_FLAGS) uuid_generate.3 uuid_generate_random.3) 155 $(E) " LINK $(man3dir)/uuid_generate_time.3" 156 $(Q) (cd $(DESTDIR)$(man3dir); \ 157 $(LN) $(LINK_INSTALL_FLAGS) uuid_generate.3 uuid_generate_time.3) 158 $(E) " INSTALL_DATA $(libdir)/pkgconfig/uuid.pc" 159 $(Q) $(INSTALL_DATA) uuid.pc $(DESTDIR)$(libdir)/pkgconfig/uuid.pc 160 161uninstall:: 162 $(RM) -f $(DESTDIR)$(libdir)/libuuid.a \ 163 $(DESTDIR)$(libdir)/pkgconfig/uuid.pc 164 for i in $(SMANPAGES); do \ 165 $(RM) -f $(DESTDIR)$(man3dir)/$$i; \ 166 done 167 $(RM) -f $(DESTDIR)$(man3dir)/uuid_generate_random.3 $(DESTDIR)$(man3dir)/uuid_generate_time.3 168 169clean:: 170 $(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* checker/* uuid.h 171 $(RM) -f ../libuuid.a ../libuuid_p.a tst_uuid uuid_time $(SMANPAGES) 172 173check:: tst_uuid 174 LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_uuid 175 176mostlyclean:: clean 177distclean:: clean 178 $(RM) -f .depend Makefile uuid.pc \ 179 $(srcdir)/TAGS $(srcdir)/Makefile.in.old 180 181# 182# Hack to parallel makes recognize dependencies correctly. 183# 184../../lib/libuuid.a: libuuid.a 185../../lib/libuuid.so: image 186../../lib/libuuid.dylib: image 187 188$(OBJS): subdirs uuid.h 189 190# +++ Dependency line eater +++ 191# 192# Makefile dependencies follow. This must be the last section in 193# the Makefile.in file 194# 195clear.o: $(srcdir)/clear.c $(srcdir)/uuidP.h 196compare.o: $(srcdir)/compare.c $(srcdir)/uuidP.h 197copy.o: $(srcdir)/copy.c $(srcdir)/uuidP.h 198gen_uuid.o: $(srcdir)/gen_uuid.c $(srcdir)/uuidP.h $(srcdir)/uuidd.h 199isnull.o: $(srcdir)/isnull.c $(srcdir)/uuidP.h 200pack.o: $(srcdir)/pack.c $(srcdir)/uuidP.h 201parse.o: $(srcdir)/parse.c $(srcdir)/uuidP.h 202unpack.o: $(srcdir)/unpack.c $(srcdir)/uuidP.h 203unparse.o: $(srcdir)/unparse.c $(srcdir)/uuidP.h 204uuid_time.o: $(srcdir)/uuid_time.c $(srcdir)/uuidP.h 205