open-src/app/dispswitch/sun-src/Makefile
author Alan Coopersmith <Alan.Coopersmith@Sun.COM>
Tue, 02 Mar 2010 13:31:46 -0800
changeset 919 425233ae7236
parent 907 3c35d611cdaa
child 943 294f64612d23
permissions -rw-r--r--
6931307 Standardize Sun copyright & license notices in X gate on current format
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
649
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     1
# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
919
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
     2
# Use is subject to license terms.
649
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     3
#
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     4
# Permission is hereby granted, free of charge, to any person obtaining a
919
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
     5
# copy of this software and associated documentation files (the "Software"),
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
     6
# to deal in the Software without restriction, including without limitation
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
     7
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
     8
# and/or sell copies of the Software, and to permit persons to whom the
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
     9
# Software is furnished to do so, subject to the following conditions:
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    10
#
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    11
# The above copyright notice and this permission notice (including the next
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    12
# paragraph) shall be included in all copies or substantial portions of the
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    13
# Software.
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    14
#
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    15
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    16
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    17
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    18
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    19
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    20
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
425233ae7236 6931307 Standardize Sun copyright & license notices in X gate on current format
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 907
diff changeset
    21
# DEALINGS IN THE SOFTWARE.
649
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    22
#
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    23
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    24
SRCS = dispswitch.c
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    25
OBJS = $(SRCS:.c=.o)
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    26
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    27
PKGS = 'xrandr >= 1.2.0' x11
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    28
PKG_CFLAGS = pkg-config --cflags $(PKGS)
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    29
PKG_LIBS = pkg-config --libs $(PKGS)
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    30
CFLAGS += $(PKG_CFLAGS:sh)
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    31
LIBS = $(PKG_LIBS:sh)
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    32
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    33
dispswitch: $(OBJS)
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    34
	$(LD) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    35
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    36
install: dispswitch
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    37
	mkdir -p $(DESTDIR)$(PREFIX)/bin \
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    38
		 $(DESTDIR)$(PREFIX)/share/man/man1 \
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    39
		 $(DESTDIR)/etc/xdg/autostart
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    40
	$(INSTALL) dispswitch $(DESTDIR)$(PREFIX)/bin
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    41
	$(INSTALL) dispswitch.man $(DESTDIR)$(PREFIX)/share/man/man1/dispswitch.1
f86993f8a87b 6809582 dispswitch should be moved to its own source directory
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    42
	$(INSTALL) gnome-dispswitch.desktop $(DESTDIR)/etc/xdg/autostart