Files

45 lines
1.8 KiB
Diff
Raw Permalink Normal View History

2023-06-19 08:43:35 -05:00
Add prefix, exec_prefix, datarootdir, and docdir vars.
2022-05-23 23:29:23 -05:00
2023-06-19 08:43:35 -05:00
Add prerequisites to displayplacer and install targets.
2022-05-23 23:29:23 -05:00
2023-06-19 08:43:35 -05:00
Fix install target to create directories and install license.
2022-05-23 23:29:23 -05:00
2023-06-19 08:43:35 -05:00
Most of these changes had been part of the following PR but the developer
added a commit to the PR that undid them:
2022-05-24 01:08:11 -05:00
https://github.com/jakehilborn/displayplacer/pull/84
2023-06-19 08:43:35 -05:00
--- src/Makefile.orig 2023-06-11 15:29:44.000000000 -0500
+++ src/Makefile 2023-06-19 08:30:36.000000000 -0500
@@ -1,4 +1,8 @@
-bindir ?= /usr/local/bin
2022-05-23 23:29:23 -05:00
+prefix ?= /usr/local
+exec_prefix ?= $(prefix)
+bindir ?= $(exec_prefix)/bin
2022-05-24 01:08:11 -05:00
+datarootdir ?= $(prefix)/share
+docdir ?= $(datarootdir)/doc/displayplacer
2023-06-19 08:43:35 -05:00
# Compiler flags:
# -Wall turns on most but not all compiler warnings
@@ -50,16 +54,18 @@
.PHONY: all
all: displayplacer
-displayplacer:
- $(CC) -I. $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) DisplayPlacer.c Legacy/v130.c -x objective-c MonitorPanel.m -o $@ $< -F./Headers -F/System/Library/PrivateFrameworks -framework IOKit -framework ApplicationServices -framework DisplayServices -framework CoreDisplay -framework OSD -framework MonitorPanel -framework SkyLight $(WARNINGS)
+displayplacer: DisplayPlacer.c Legacy/v130.c MonitorPanel.m Header.h Headers/Bridging-Header.h
+ $(CC) -I. $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(wordlist 1,2,$^) -x objective-c $(word 3,$^) -o $@ -F./Headers -F/System/Library/PrivateFrameworks -framework IOKit -framework ApplicationServices -framework DisplayServices -framework CoreDisplay -framework OSD -framework MonitorPanel -framework SkyLight $(WARNINGS)
.PHONY: debug
debug: CFLAGS += -g
debug: displayplacer
.PHONY: install
-install: displayplacer
+install: displayplacer ../LICENSE
2022-05-24 01:08:11 -05:00
+ mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(docdir)
2023-06-19 08:43:35 -05:00
$(INSTALL_PROGRAM) $< $(DESTDIR)$(bindir)
+ $(INSTALL_DATA) $(word 2,$^) $(DESTDIR)$(docdir)
.PHONY: clean
clean: