7 VERSION
= $(MAJOR_VERSION
).
$(MINOR_VERSION
)
10 ifeq ($(TARGET_OS
),CYGWIN
)
11 SHORTNAME
= libdha.dll
13 SHORTNAME
= libdha.so.
$(MAJOR_VERSION
)
14 SONAME_FLAGS
= -Wl
,-soname
,$(SHORTNAME
)
15 #SHORTNAME = libdha.so
16 VSHORTNAME
= libdha.so
18 ifeq ($(TARGET_WIN32
),yes
)
22 LIBNAME
= libdha.so.
$(VERSION
)
32 CFLAGS
= $(OPTFLAGS
) -fPIC
-I.
-I..
34 ifeq ($(TARGET_OS
),OpenBSD
)
35 ifeq ($(TARGET_ARCH_X86
),yes
)
40 # If you want libdha to use svgalib_helper for hardware access,
41 # uncomment this statement, and change the -I to the correct directory
42 # that includes svgalib_helper.o:
43 ifneq ($(wildcard svgalib_helper
),)
44 CFLAGS
+= -DDEV_SVGA
=\"/dev
/svga
\" -DCONFIG_SVGAHELPER
-Isvgalib_helper
/
52 $(CC
) -c
$(CFLAGS
) -o
$@
$<
55 ifeq ($(TARGET_WIN32
),yes
)
56 $(AR
) r
$(LIBNAME
) $(OBJS
)
58 #$(CC) -shared $(SONAME_FLAGS) -o $(LIBNAME) $(OBJS) $(LIBS)
59 $(CC
) -shared
-Wl
,-soname
-Wl
,$(LIBNAME
) -o
$(LIBNAME
) $(OBJS
) $(LIBS
)
60 ln
-sf
$(LIBNAME
) $(SHORTNAME
)
61 ln
-sf
$(LIBNAME
) $(VSHORTNAME
)
64 all: $(LIBNAME
) $(SHORTNAME
)
67 LC_ALL
=C
$(AWK
) -f pci_db2c.awk oth
/pci.db
70 $(CC
) test.c
-o
test $(SHORTNAME
)
73 rm -f
*.o
*.a
*~
*.so
*.so.
*
77 rm -f pci_dev_ids.c pci_ids.h pci_names.c pci_names.h pci_vendors.h pci.db
82 $(CC
) -MM
$(CFLAGS
) $(SRCS
) 1>.depend
86 install -m
755 $(INSTALLSTRIP
) -p
$(LIBNAME
) $(LIBDIR
)/$(LIBNAME
)
87 rm -f
$(LIBDIR
)/libdha.so
88 ln
-sf
$(LIBNAME
) $(LIBDIR
)/$(SHORTNAME
)
89 ifeq ($(TARGET_OS
),OpenBSD
)
96 rm -f
$(LIBDIR
)/libdha.so
$(LIBDIR
)/$(SHORTNAME
) $(LIBDIR
)/$(LIBNAME
)
97 ifeq ($(TARGET_OS
),OpenBSD
)
104 # include dependency files if they exist
106 ifneq ($(wildcard .depend
),)