equal
deleted
inserted
replaced
1 # -*- Makefile -*- rules common to most X.Org library modules |
1 # -*- Makefile -*- rules common to most X.Org library modules |
2 # |
2 # |
3 # Copyright 2007 Sun Microsystems, Inc. All rights reserved. |
3 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
4 # Use subject to license terms. |
4 # Use subject to license terms. |
5 # |
5 # |
6 # Permission is hereby granted, free of charge, to any person obtaining a |
6 # Permission is hereby granted, free of charge, to any person obtaining a |
7 # copy of this software and associated documentation files (the |
7 # copy of this software and associated documentation files (the |
8 # "Software"), to deal in the Software without restriction, including |
8 # "Software"), to deal in the Software without restriction, including |
26 # Except as contained in this notice, the name of a copyright holder |
26 # Except as contained in this notice, the name of a copyright holder |
27 # shall not be used in advertising or otherwise to promote the sale, use |
27 # shall not be used in advertising or otherwise to promote the sale, use |
28 # or other dealings in this Software without prior written authorization |
28 # or other dealings in this Software without prior written authorization |
29 # of the copyright holder. |
29 # of the copyright holder. |
30 # |
30 # |
31 # @(#)Makefile.inc 1.8 08/01/16 |
31 # @(#)Makefile.inc 1.9 08/01/23 |
32 # |
32 # |
33 |
33 |
34 PWD:sh=pwd |
34 PWD:sh=pwd |
35 TOP=$(PWD)/../.. |
35 TOP=$(PWD)/../.. |
36 |
36 |
62 $(LIB_ADD_CONFIG_OPTS) |
62 $(LIB_ADD_CONFIG_OPTS) |
63 |
63 |
64 # Environment variable options to GNU autoconf configure script |
64 # Environment variable options to GNU autoconf configure script |
65 THIS_LIB_CFLAGS=$(LIB_CFLAGS) -I$(PROTODIR)/usr/X11/include $(LIB_ADD_CFLAGS) |
65 THIS_LIB_CFLAGS=$(LIB_CFLAGS) -I$(PROTODIR)/usr/X11/include $(LIB_ADD_CFLAGS) |
66 |
66 |
|
67 # Use proto area for building against current library versions |
|
68 LIB_LD_OPTIONS = $(LIB_REQUIRED_LDFLAGS) \ |
|
69 -L$(PROTODIR)$(X11_DIR)/lib$(LIBSUBDIR) $(LIB_ADD_LD_OPTIONS) |
|
70 |
67 CONFIG_ENV = CC=$(CC) CFLAGS="$(THIS_LIB_CFLAGS)" LD="$(LD) $(LDFLAGS)" \ |
71 CONFIG_ENV = CC=$(CC) CFLAGS="$(THIS_LIB_CFLAGS)" LD="$(LD) $(LDFLAGS)" \ |
68 CPPFLAGS="-I $(PROTODIR)$(X11_INCLUDES_DIR) $(LIB_ADD_CPPFLAGS)" \ |
72 CPPFLAGS="-I $(PROTODIR)$(X11_INCLUDES_DIR) $(LIB_ADD_CPPFLAGS)" \ |
69 LDFLAGS="$(LIB_LDFLAGS) -L$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR)" \ |
73 LDFLAGS="$(LIB_LDFLAGS) -L$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR) -L$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR)" \ |
70 PKG_CONFIG_PATH=$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR)/pkgconfig:$(TOP)/common/pc-files/$(BUILD_DIR):/usr/lib$(ARCHLIBSUBDIR)/pkgconfig \ |
74 PKG_CONFIG_PATH=$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR)/pkgconfig:$(TOP)/common/pc-files/$(BUILD_DIR):/usr/lib$(ARCHLIBSUBDIR)/pkgconfig \ |
71 INSTALL="$(TOP)/common/install-sh -c" CPPROG="cp -p" \ |
75 INSTALL="$(TOP)/common/install-sh -c" CPPROG="cp -p" \ |
72 LIB_MAN_SUFFIX=$(LIB_MAN_SUFFIX) $(LIB_ADD_CONFIG_ENV) |
76 LIB_MAN_SUFFIX=$(LIB_MAN_SUFFIX) $(LIB_ADD_CONFIG_ENV) |
73 |
77 |
74 # Run configure script |
78 # Run configure script |
77 $(CONFIG_ENV) ./configure $(CONFIG_OPTS) ) |
81 $(CONFIG_ENV) ./configure $(CONFIG_OPTS) ) |
78 |
82 |
79 build_gen: $(LIB_BUILT) |
83 build_gen: $(LIB_BUILT) |
80 |
84 |
81 $(LIB_BUILT): $(SOURCE_DIR)/Makefile $(LIB_ADD_BUILD_DEPS) |
85 $(LIB_BUILT): $(SOURCE_DIR)/Makefile $(LIB_ADD_BUILD_DEPS) |
82 (cd $(SOURCE_DIR) ; $(LIBPATHS) LD_OPTIONS="$(LIB_REQUIRED_LDFLAGS) $(LIB_ADD_LD_OPTIONS)" $(MAKE) $(MFLAGS) $(LIB_ADD_MAKEFLAGS) ) |
86 (cd $(SOURCE_DIR) ; $(LIBPATHS) LD_OPTIONS="$(LIB_LD_OPTIONS)" $(MAKE) $(MFLAGS) $(LIB_ADD_MAKEFLAGS) ) |
83 |
|
84 # Use proto area for building against current library versions |
|
85 LIB_LD_OPTIONS = $(LIB_REQUIRED_LDFLAGS) \ |
|
86 -L$(PROTODIR)$(X11_DIR)/lib$(LIBSUBDIR) $(LIB_ADD_LD_OPTIONS) |
|
87 |
87 |
88 install_gen:: $(LIB_BUILT) |
88 install_gen:: $(LIB_BUILT) |
89 (cd $(SOURCE_DIR) ; $(LIBPATHS) LD_OPTIONS="$(LIB_LD_OPTIONS)" $(MAKE) $(MFLAGS) -e DESTDIR=$(PROTODIR) libdir=$(LIB_PREFIX)/lib$(LIB_ADD_SUBDIR)$(ARCHLIBSUBDIR) install pkgconfigdir=/usr/lib$(ARCHLIBSUBDIR)/pkgconfig $(LIB_ADD_MAKEFLAGS)) |
89 (cd $(SOURCE_DIR) ; $(LIBPATHS) LD_OPTIONS="$(LIB_LD_OPTIONS)" $(MAKE) $(MFLAGS) -e DESTDIR=$(PROTODIR) libdir=$(LIB_PREFIX)/lib$(LIB_ADD_SUBDIR)$(ARCHLIBSUBDIR) install pkgconfigdir=/usr/lib$(ARCHLIBSUBDIR)/pkgconfig $(LIB_ADD_MAKEFLAGS)) |