aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 12 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 2380dad..d85d1a0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,22 @@
TARGET = mpc-bar
-CFLAGS = -O2 -fobjc-arc -Wall
-LDFLAGS = -lmpdclient -framework Cocoa
+CFLAGS = -I/usr/local/opt/lua@5.4/include -O2 -fobjc-arc -Wall
+LDFLAGS = -L/usr/local/opt/lua@5.4/lib -lmpdclient -llua5.4 -framework Cocoa
+OUTPUT_OPTION=-MMD -MP -o $@
BINDIR = /usr/local/bin
-$(TARGET): mpc-bar.o ini.o
- $(CC) $^ $(LDFLAGS) -o $@
+OBJ = mpc-bar.o ini.o
+MPC_SRC = $(wildcard mpc/*.c)
+OBJ += $(MPC_SRC:.c=.o)
+DEP = $(OBJ:.o=.d)
-mpc-bar.o ini.o: ini.h
+$(TARGET): $(OBJ)
+ $(CC) $^ $(LDFLAGS) -o $@
install: $(TARGET)
install -d $(BINDIR)
install -m755 $< $(BINDIR)/$<
+-include $(DEP)
+
clean:
- rm -f $(TARGET) mpc-bar.o ini.o
+ rm -f $(TARGET) $(OBJ) $(DEP)