comparison libdha/Makefile @ 11238:38ce28265e5f

imho static linking causes less problems for mingw
author faust3
date Wed, 22 Oct 2003 20:17:23 +0000
parents 60d1ccf22469
children 841fd0c2f2e3
comparison
equal deleted inserted replaced
11237:1c8ba87ddb03 11238:38ce28265e5f
13 SHORTNAME = libdha.so.$(MAJOR_VERSION) 13 SHORTNAME = libdha.so.$(MAJOR_VERSION)
14 SONAME_FLAGS = -Wl,-soname,$(SHORTNAME) 14 SONAME_FLAGS = -Wl,-soname,$(SHORTNAME)
15 #SHORTNAME = libdha.so 15 #SHORTNAME = libdha.so
16 VSHORTNAME = libdha.so 16 VSHORTNAME = libdha.so
17 endif 17 endif
18 ifeq ($(TARGET_MINGW32),yes)
19 LIBNAME = libdha.a
20 SHORTNAME = libdha.a
21 else
18 LIBNAME = libdha.so.$(VERSION) 22 LIBNAME = libdha.so.$(VERSION)
23 endif
19 24
20 SRCS=libdha.c mtrr.c pci.c pci_names.c 25 SRCS=libdha.c mtrr.c pci.c pci_names.c
21 OBJS=$(SRCS:.c=.o) 26 OBJS=$(SRCS:.c=.o)
22 27
23 CFLAGS = $(OPTFLAGS) -fPIC -I. -I.. 28 CFLAGS = $(OPTFLAGS) -fPIC -I. -I..
41 46
42 .c.o: pci_names.c 47 .c.o: pci_names.c
43 $(CC) -c $(CFLAGS) -o $@ $< 48 $(CC) -c $(CFLAGS) -o $@ $<
44 49
45 $(LIBNAME): $(OBJS) 50 $(LIBNAME): $(OBJS)
51 ifeq ($(TARGET_MINGW32),yes)
52 $(AR) r $(LIBNAME) $(OBJS)
53 else
46 #$(CC) -shared $(SONAME_FLAGS) -o $(LIBNAME) $(OBJS) $(LIBS) 54 #$(CC) -shared $(SONAME_FLAGS) -o $(LIBNAME) $(OBJS) $(LIBS)
47 $(CC) -shared -Wl,-soname -Wl,$(LIBNAME) -o $(LIBNAME) $(OBJS) $(LIBS) 55 $(CC) -shared -Wl,-soname -Wl,$(LIBNAME) -o $(LIBNAME) $(OBJS) $(LIBS)
48 ln -sf $(LIBNAME) $(SHORTNAME) 56 ln -sf $(LIBNAME) $(SHORTNAME)
49 ln -sf $(LIBNAME) $(VSHORTNAME) 57 ln -sf $(LIBNAME) $(VSHORTNAME)
58 endif
50 59
51 all: $(LIBNAME) $(SHORTNAME) 60 all: $(LIBNAME) $(SHORTNAME)
52 61
53 pci_names.c: 62 pci_names.c:
54 $(AWK) -f pci_db2c.awk oth/pci.db 63 $(AWK) -f pci_db2c.awk oth/pci.db