Mercurial > mplayer.hg
annotate libdha/Makefile @ 6356:b54d7fd6471a
This script has no bash specific stuff, it's all standard bourne shell, so execute with sh.
Also see mail from Michaela.
author | atmos4 |
---|---|
date | Sun, 09 Jun 2002 14:48:16 +0000 |
parents | 136c061fab12 |
children | 10131c2b3987 |
rev | line source |
---|---|
3973 | 1 # makefile |
2 | |
3 include ../config.mak | |
4 | |
5 VERSION = 0.1 | |
6 | |
4167 | 7 ifeq ($(TARGET_OS),CYGWIN) |
8 SHORTNAME = libdha.dll | |
9 else | |
3973 | 10 SHORTNAME = libdha.so |
4167 | 11 endif |
3973 | 12 LIBNAME = libdha-$(VERSION).so |
13 | |
4476 | 14 SRCS=libdha.c mtrr.c pci.c pci_names.c |
3973 | 15 OBJS=$(SRCS:.c=.o) |
16 | |
17 CFLAGS = $(OPTFLAGS) -fPIC -I. -I.. -Wall -W | |
6057
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
18 LIBS = |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
19 ifeq ($(TARGET_OS),OpenBSD) |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
20 LIBS += -li386 |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
21 endif |
3973 | 22 |
23 .SUFFIXES: .c .o | |
24 | |
25 # .PHONY: all clean | |
26 | |
27 .c.o: | |
28 $(CC) -c $(CFLAGS) -o $@ $< | |
29 | |
30 $(LIBNAME): $(OBJS) | |
6057
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
31 $(CC) -shared -o $(LIBNAME) $(OBJS) $(LIBS) |
3973 | 32 ln -sf $(LIBNAME) $(SHORTNAME) |
33 | |
34 all: $(LIBNAME) $(SHORTNAME) | |
35 | |
4106 | 36 pci_names.c: |
6253
136c061fab12
pci.db is now uncompressed in cvs, sync with mplayerxp
arpi
parents:
6057
diff
changeset
|
37 $(AWK) -f pci_db2c.awk oth/pci.db |
4106 | 38 |
3973 | 39 test: |
40 $(CC) test.c -o test $(SHORTNAME) | |
41 | |
42 clean: | |
43 rm -f *.o *.so *~ | |
44 | |
45 distclean: | |
46 rm -f Makefile.bak *.o *.so test *~ .depend | |
4106 | 47 rm -f pci_dev_ids.c pci_ids.h pci_names.c pci_names.h pci_vendors.h pci.db |
3973 | 48 |
49 dep: depend | |
50 | |
51 depend: | |
52 $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend | |
53 | |
54 install: | |
4215 | 55 mkdir -p $(prefix)/lib |
56 install -m 755 -s -p $(LIBNAME) $(prefix)/lib/$(LIBNAME) | |
4030 | 57 rm -f $(prefix)/lib/libdha.so |
6057
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
58 ln -sf $(LIBNAME) $(prefix)/lib/$(SHORTNAME) |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
59 ifeq ($(TARGET_OS),OpenBSD) |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
60 ldconfig -R |
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
61 else |
3973 | 62 ldconfig |
6057
31e465fda59c
various openbsd and general warning fixes - patch by Bj«Órn Sandell <biorn@dce.chalmers.se>
arpi
parents:
4476
diff
changeset
|
63 endif |
3973 | 64 |
65 # | |
66 # include dependency files if they exist | |
67 # | |
68 ifneq ($(wildcard .depend),) | |
69 include .depend | |
70 endif |