commit e301f6c7712fceda51285d247b86af975f6db45c
parent bc2a6462fb9d679449fecdc0108fc50b5a4d34e0
Author: Michael Forney <mforney@mforney.org>
Date: Sat, 7 Dec 2013 01:52:52 -0800
Makefile.* -> *.mk
Diffstat:
9 files changed, 193 insertions(+), 193 deletions(-)
diff --git a/Makefile b/Makefile
@@ -46,7 +46,7 @@ link = $(call quiet,CCLD,$(CC)) $(FINAL_CFLAGS) -o $@ $^
pkgconfig = $(sort $(foreach pkg,$(1),$(if $($(pkg)_$(3)),$($(pkg)_$(3)), \
$(shell $(PKG_CONFIG) --$(2) $(pkg)))))
-include $(SUBDIRS:%=%/Makefile.local)
+include $(SUBDIRS:%=%/local.mk)
$(foreach dir,BIN LIB INCLUDE PKGCONFIG,$(DESTDIR)$($(dir)DIR)):
mkdir -p "$@"
diff --git a/Makefile.common b/Makefile.common
@@ -1,31 +0,0 @@
-# swc: Makefile.common
-
-.PHONY: check-dependencies-$(dir)
-check-dependencies-$(dir):
-
-.PHONY: build-$(dir)
-build-$(dir): $($(dir)_TARGETS)
-
-.PHONY: install-$(dir)
-install-$(dir):
-
-.deps/$(dir):
- @mkdir -p "$@"
-
-$(dir)/%.o: $(dir)/%.c | .deps/$(dir)
- $(compile) $($(@D)_CFLAGS) $($(@D)_PACKAGE_CFLAGS)
-
-$(dir)/%.lo: $(dir)/%.c | .deps/$(dir)
- $(compile) -fPIC $($(@D)_CFLAGS) $($(@D)_PACKAGE_CFLAGS)
-
-ifdef $(dir)_PACKAGES
- ifndef $(dir)_PACKAGE_CFLAGS
- $(dir)_PACKAGE_CFLAGS := $(call pkgconfig,$($(dir)_PACKAGES),cflags,CFLAGS)
- endif
- ifndef $(dir)_PACKAGE_LIBS
- $(dir)_PACKAGE_LIBS := $(call pkgconfig,$($(dir)_PACKAGES),libs,LIBS)
- endif
-endif
-
-CLEAN_FILES += $($(dir)_TARGETS)
-
diff --git a/common.mk b/common.mk
@@ -0,0 +1,31 @@
+# swc: common.mk
+
+.PHONY: check-dependencies-$(dir)
+check-dependencies-$(dir):
+
+.PHONY: build-$(dir)
+build-$(dir): $($(dir)_TARGETS)
+
+.PHONY: install-$(dir)
+install-$(dir):
+
+.deps/$(dir):
+ @mkdir -p "$@"
+
+$(dir)/%.o: $(dir)/%.c | .deps/$(dir)
+ $(compile) $($(@D)_CFLAGS) $($(@D)_PACKAGE_CFLAGS)
+
+$(dir)/%.lo: $(dir)/%.c | .deps/$(dir)
+ $(compile) -fPIC $($(@D)_CFLAGS) $($(@D)_PACKAGE_CFLAGS)
+
+ifdef $(dir)_PACKAGES
+ ifndef $(dir)_PACKAGE_CFLAGS
+ $(dir)_PACKAGE_CFLAGS := $(call pkgconfig,$($(dir)_PACKAGES),cflags,CFLAGS)
+ endif
+ ifndef $(dir)_PACKAGE_LIBS
+ $(dir)_PACKAGE_LIBS := $(call pkgconfig,$($(dir)_PACKAGES),libs,LIBS)
+ endif
+endif
+
+CLEAN_FILES += $($(dir)_TARGETS)
+
diff --git a/launch/Makefile.local b/launch/Makefile.local
@@ -1,23 +0,0 @@
-# swc: launch/Makefile.local
-
-dir := launch
-
-$(dir)_TARGETS := $(dir)/swc-launch
-
-# Dependencies
-$(dir)_PACKAGES = \
- libdrm
-
-$(dir)/swc-launch: $(dir)/launch.o $(dir)/protocol.o
- $(link) $(launch_PACKAGE_LIBS)
-
-check-dependencies-$(dir):
- $(call check_deps,swc-launch,$(LAUNCH_PACKAGES))
-
-install-$(dir): $(dir)/swc-launch | $(DESTDIR)$(BINDIR)
- install -m4755 launch/swc-launch "$(DESTDIR)$(BINDIR)"
-
-CLEAN_FILES += $(dir)/launch.o
-
-include Makefile.common
-
diff --git a/launch/local.mk b/launch/local.mk
@@ -0,0 +1,23 @@
+# swc: launch/local.mk
+
+dir := launch
+
+$(dir)_TARGETS := $(dir)/swc-launch
+
+# Dependencies
+$(dir)_PACKAGES = \
+ libdrm
+
+$(dir)/swc-launch: $(dir)/launch.o $(dir)/protocol.o
+ $(link) $(launch_PACKAGE_LIBS)
+
+check-dependencies-$(dir):
+ $(call check_deps,swc-launch,$(LAUNCH_PACKAGES))
+
+install-$(dir): $(dir)/swc-launch | $(DESTDIR)$(BINDIR)
+ install -m4755 launch/swc-launch "$(DESTDIR)$(BINDIR)"
+
+CLEAN_FILES += $(dir)/launch.o
+
+include common.mk
+
diff --git a/libswc/Makefile.local b/libswc/Makefile.local
@@ -1,119 +0,0 @@
-# swc: libswc/Makefile.local
-
-dir := libswc
-
-LIBSWC_LINK := libswc.so
-LIBSWC_SO := $(LIBSWC_LINK).$(VERSION_MAJOR)
-LIBSWC_LIB := $(LIBSWC_SO).$(VERSION_MINOR)
-
-ifneq ($(ENABLE_STATIC), 0)
-$(dir)_TARGETS += $(dir)/libswc.a
-endif
-
-ifneq ($(ENABLE_SHARED), 0)
-$(dir)_SHARED_TARGETS := \
- $(dir)/$(LIBSWC_LIB) \
- $(dir)/$(LIBSWC_SO) \
- $(dir)/$(LIBSWC_LINK)
-$(dir)_TARGETS += libswc-shared
-endif
-
-# Dependencies
-$(dir)_PACKAGES = \
- libdrm \
- libevdev \
- libudev \
- pixman-1 \
- wayland-server \
- wld \
- xkbcommon
-
-SWC_SOURCES = \
- libswc/compositor.c \
- libswc/util.c \
- libswc/output.c \
- libswc/plane.c \
- libswc/surface.c \
- libswc/compositor_surface.c \
- libswc/cursor_surface.c \
- libswc/region.c \
- libswc/renderer.c \
- libswc/input_focus.c \
- libswc/keyboard.c \
- libswc/pointer.c \
- libswc/seat.c \
- libswc/data_device_manager.c \
- libswc/data_device.c \
- libswc/data.c \
- libswc/mode.c \
- libswc/evdev_device.c \
- libswc/xkb.c \
- libswc/drm.c \
- libswc/drm_buffer.c \
- protocol/wayland-drm-protocol.c \
- launch/protocol.c
-
-# Public interface
-SWC_SOURCES += \
- libswc/swc.c \
- libswc/window.c \
- libswc/shell.c \
- libswc/shell_surface.c \
- libswc/bindings.c
-
-ifeq ($(ENABLE_XWAYLAND),1)
-$(dir)_CFLAGS += -DENABLE_XWAYLAND
-$(dir)_PACKAGES += \
- xcb \
- xcb-composite \
- xcb-ewmh
-
-SWC_SOURCES += \
- libswc/xserver.c \
- libswc/xwm.c \
- protocol/xserver-protocol.c
-endif
-
-SWC_STATIC_OBJECTS = $(SWC_SOURCES:%.c=%.o)
-SWC_SHARED_OBJECTS = $(SWC_SOURCES:%.c=%.lo)
-
-# Explicitly state dependencies on generated files
-objects = $(foreach obj,$(1),$(dir)/$(obj).o $(dir)/$(obj.lo))
-$(call objects,drm drm_buffer): protocol/wayland-drm-server-protocol.h
-$(call objects,xserver): protocol/xserver-server-protocol.h
-
-$(dir)/libswc.a: $(SWC_STATIC_OBJECTS)
- $(call quiet,AR) cru $@ $^
-
-$(dir)/$(LIBSWC_LIB): $(SWC_SHARED_OBJECTS)
- $(link) -shared -Wl,-soname,$(LIBSWC_SO) -Wl,-no-undefined $(libswc_PACKAGE_LIBS)
-
-$(dir)/$(LIBSWC_SO): $(dir)/$(LIBSWC_LIB)
- $(call quiet,SYM,ln -sf) $(notdir $<) $@
-
-$(dir)/$(LIBSWC_LINK): $(dir)/$(LIBSWC_SO)
- $(call quiet,SYM,ln -sf) $(notdir $<) $@
-
-.PHONY: libswc-shared
-libswc-shared: $($(dir)_SHARED_TARGETS)
-
-.PHONY: install-libswc.a
-install-libswc.a: $(dir)/libswc.a | $(DESTDIR)$(LIBDIR)
- install -m0644 $< "$(DESTDIR)$(LIBDIR)"
-
-.PHONY: install-libswc-shared
-install-libswc-shared: $(dir)/$(LIBSWC_LIB) | $(DESTDIR)$(LIBDIR)
- install -m0755 $< "$(DESTDIR)$(LIBDIR)"
- ln -sf $(LIBSWC_LIB) "$(DESTDIR)$(LIBDIR)/$(LIBSWC_SO)"
- ln -sf $(LIBSWC_SO) "$(DESTDIR)$(LIBDIR)/$(LIBSWC_LINK)"
-
-check-dependencies-libswc:
- $(call check_deps,libswc,$(SWC_PACKAGES))
-
-install-libswc: $($(dir)_TARGETS:$(dir)/%=install-%) | $(DESTDIR)$(INCLUDEDIR)
- install -m0644 libswc/swc.h "$(DESTDIR)$(INCLUDEDIR)"
-
-CLEAN_FILES += $(SWC_SHARED_OBJECTS) $(SWC_STATIC_OBJECTS) $($(dir)_SHARED_TARGETS)
-
-include Makefile.common
-
diff --git a/libswc/local.mk b/libswc/local.mk
@@ -0,0 +1,119 @@
+# swc: libswc/local.mk
+
+dir := libswc
+
+LIBSWC_LINK := libswc.so
+LIBSWC_SO := $(LIBSWC_LINK).$(VERSION_MAJOR)
+LIBSWC_LIB := $(LIBSWC_SO).$(VERSION_MINOR)
+
+ifneq ($(ENABLE_STATIC), 0)
+$(dir)_TARGETS += $(dir)/libswc.a
+endif
+
+ifneq ($(ENABLE_SHARED), 0)
+$(dir)_SHARED_TARGETS := \
+ $(dir)/$(LIBSWC_LIB) \
+ $(dir)/$(LIBSWC_SO) \
+ $(dir)/$(LIBSWC_LINK)
+$(dir)_TARGETS += libswc-shared
+endif
+
+# Dependencies
+$(dir)_PACKAGES = \
+ libdrm \
+ libevdev \
+ libudev \
+ pixman-1 \
+ wayland-server \
+ wld \
+ xkbcommon
+
+SWC_SOURCES = \
+ libswc/compositor.c \
+ libswc/util.c \
+ libswc/output.c \
+ libswc/plane.c \
+ libswc/surface.c \
+ libswc/compositor_surface.c \
+ libswc/cursor_surface.c \
+ libswc/region.c \
+ libswc/renderer.c \
+ libswc/input_focus.c \
+ libswc/keyboard.c \
+ libswc/pointer.c \
+ libswc/seat.c \
+ libswc/data_device_manager.c \
+ libswc/data_device.c \
+ libswc/data.c \
+ libswc/mode.c \
+ libswc/evdev_device.c \
+ libswc/xkb.c \
+ libswc/drm.c \
+ libswc/drm_buffer.c \
+ protocol/wayland-drm-protocol.c \
+ launch/protocol.c
+
+# Public interface
+SWC_SOURCES += \
+ libswc/swc.c \
+ libswc/window.c \
+ libswc/shell.c \
+ libswc/shell_surface.c \
+ libswc/bindings.c
+
+ifeq ($(ENABLE_XWAYLAND),1)
+$(dir)_CFLAGS += -DENABLE_XWAYLAND
+$(dir)_PACKAGES += \
+ xcb \
+ xcb-composite \
+ xcb-ewmh
+
+SWC_SOURCES += \
+ libswc/xserver.c \
+ libswc/xwm.c \
+ protocol/xserver-protocol.c
+endif
+
+SWC_STATIC_OBJECTS = $(SWC_SOURCES:%.c=%.o)
+SWC_SHARED_OBJECTS = $(SWC_SOURCES:%.c=%.lo)
+
+# Explicitly state dependencies on generated files
+objects = $(foreach obj,$(1),$(dir)/$(obj).o $(dir)/$(obj.lo))
+$(call objects,drm drm_buffer): protocol/wayland-drm-server-protocol.h
+$(call objects,xserver): protocol/xserver-server-protocol.h
+
+$(dir)/libswc.a: $(SWC_STATIC_OBJECTS)
+ $(call quiet,AR) cru $@ $^
+
+$(dir)/$(LIBSWC_LIB): $(SWC_SHARED_OBJECTS)
+ $(link) -shared -Wl,-soname,$(LIBSWC_SO) -Wl,-no-undefined $(libswc_PACKAGE_LIBS)
+
+$(dir)/$(LIBSWC_SO): $(dir)/$(LIBSWC_LIB)
+ $(call quiet,SYM,ln -sf) $(notdir $<) $@
+
+$(dir)/$(LIBSWC_LINK): $(dir)/$(LIBSWC_SO)
+ $(call quiet,SYM,ln -sf) $(notdir $<) $@
+
+.PHONY: libswc-shared
+libswc-shared: $($(dir)_SHARED_TARGETS)
+
+.PHONY: install-libswc.a
+install-libswc.a: $(dir)/libswc.a | $(DESTDIR)$(LIBDIR)
+ install -m0644 $< "$(DESTDIR)$(LIBDIR)"
+
+.PHONY: install-libswc-shared
+install-libswc-shared: $(dir)/$(LIBSWC_LIB) | $(DESTDIR)$(LIBDIR)
+ install -m0755 $< "$(DESTDIR)$(LIBDIR)"
+ ln -sf $(LIBSWC_LIB) "$(DESTDIR)$(LIBDIR)/$(LIBSWC_SO)"
+ ln -sf $(LIBSWC_SO) "$(DESTDIR)$(LIBDIR)/$(LIBSWC_LINK)"
+
+check-dependencies-libswc:
+ $(call check_deps,libswc,$(SWC_PACKAGES))
+
+install-libswc: $($(dir)_TARGETS:$(dir)/%=install-%) | $(DESTDIR)$(INCLUDEDIR)
+ install -m0644 libswc/swc.h "$(DESTDIR)$(INCLUDEDIR)"
+
+CLEAN_FILES += $(SWC_SHARED_OBJECTS) $(SWC_STATIC_OBJECTS) $($(dir)_SHARED_TARGETS)
+
+include common.mk
+
diff --git a/protocol/Makefile.local b/protocol/Makefile.local
@@ -1,19 +0,0 @@
-# swc: protocol/Makefile.local
-
-dir := protocol
-
-PROTOCOL_EXTENSIONS = \
- $(dir)/wayland-drm.xml \
- $(dir)/xserver.xml
-
-$(dir)_TARGETS := $(PROTOCOL_EXTENSIONS:%.xml=%-protocol.c) \
- $(PROTOCOL_EXTENSIONS:%.xml=%-server-protocol.h)
-
-$(dir)/%-protocol.c: $(dir)/%.xml
- $(call quiet,GEN,$(WAYLAND_SCANNER)) code < $< > $@
-
-$(dir)/%-server-protocol.h: $(dir)/%.xml
- $(call quiet,GEN,$(WAYLAND_SCANNER)) server-header < $< > $@
-
-include Makefile.common
-
diff --git a/protocol/local.mk b/protocol/local.mk
@@ -0,0 +1,19 @@
+# swc: protocol/local.mk
+
+dir := protocol
+
+PROTOCOL_EXTENSIONS = \
+ $(dir)/wayland-drm.xml \
+ $(dir)/xserver.xml
+
+$(dir)_TARGETS := $(PROTOCOL_EXTENSIONS:%.xml=%-protocol.c) \
+ $(PROTOCOL_EXTENSIONS:%.xml=%-server-protocol.h)
+
+$(dir)/%-protocol.c: $(dir)/%.xml
+ $(call quiet,GEN,$(WAYLAND_SCANNER)) code < $< > $@
+
+$(dir)/%-server-protocol.h: $(dir)/%.xml
+ $(call quiet,GEN,$(WAYLAND_SCANNER)) server-header < $< > $@
+
+include common.mk
+