comparison libdha/Makefile @ 7811:aa0536d98278

change versioning of libdha, patch from Guillem Jover <guillem.jover@menta.net>
author eyck
date Sun, 20 Oct 2002 08:43:09 +0000
parents b69ddd4d3bb9
children 29a006405a5f
comparison
equal deleted inserted replaced
7810:37ae6cfc7cf2 7811:aa0536d98278
1 # makefile 1 # makefile
2 2
3 include ../config.mak 3 include ../config.mak
4 4
5 VERSION = 0.1 5 MAJOR_VERSION = 0
6 MINOR_VERSION = 1
7 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION)
8
6 9
7 ifeq ($(TARGET_OS),CYGWIN) 10 ifeq ($(TARGET_OS),CYGWIN)
8 SHORTNAME = libdha.dll 11 SHORTNAME = libdha.dll
9 else 12 else
10 SHORTNAME = libdha.so 13 SHORTNAME = libdha.so.$(MAJOR_VERSION)
14 SONAME_FLAGS = -Wl,-soname,$(SHORTNAME)
11 endif 15 endif
12 LIBNAME = libdha.so.$(VERSION) 16 LIBNAME = libdha.so.$(VERSION)
13 17
14 SRCS=libdha.c mtrr.c pci.c pci_names.c 18 SRCS=libdha.c mtrr.c pci.c pci_names.c
15 OBJS=$(SRCS:.c=.o) 19 OBJS=$(SRCS:.c=.o)
28 32
29 .c.o: 33 .c.o:
30 $(CC) -c $(CFLAGS) -o $@ $< 34 $(CC) -c $(CFLAGS) -o $@ $<
31 35
32 $(LIBNAME): $(OBJS) 36 $(LIBNAME): $(OBJS)
33 $(CC) -shared -Wl,-soname -Wl,$(LIBNAME) -o $(LIBNAME) $(OBJS) $(LIBS) 37 $(CC) -shared $(SONAME_FLAGS) -o $(LIBNAME) $(OBJS) $(LIBS)
34 ln -sf $(LIBNAME) $(SHORTNAME) 38 ln -sf $(LIBNAME) $(SHORTNAME)
35 39
36 all: $(LIBNAME) $(SHORTNAME) 40 all: $(LIBNAME) $(SHORTNAME)
37 41
38 pci_names.c: 42 pci_names.c:
40 44
41 test: 45 test:
42 $(CC) test.c -o test $(SHORTNAME) 46 $(CC) test.c -o test $(SHORTNAME)
43 47
44 clean: 48 clean:
45 rm -f *.o *.so *~ 49 rm -f *.o *.so *.so.* *~
46 50
47 distclean: 51 distclean:
48 rm -f Makefile.bak *.o *.so test *~ .depend 52 rm -f Makefile.bak *.o *.so *.so.* test *~ .depend
49 rm -f pci_dev_ids.c pci_ids.h pci_names.c pci_names.h pci_vendors.h pci.db 53 rm -f pci_dev_ids.c pci_ids.h pci_names.c pci_names.h pci_vendors.h pci.db
50 54
51 dep: depend 55 dep: depend
52 56
53 depend: 57 depend: