-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (33 loc) · 966 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Makefile for ddb_gui_prompt plugin
ifeq ($(OS),Windows_NT)
SUFFIX = dll
else
SUFFIX = so
endif
CC=gcc
STD=gnu99
CFLAGS=-fPIC -I /usr/local/include -O2 -Wall
ifeq ($(DEBUG),1)
CFLAGS +=-g -O0
endif
PREFIX=~/.local/lib/deadbeef
PLUGNAME=prompt
PLUGNAME_PREFIX=ddb_gui
LIBS=-lreadline
C_FILES= assets.c cmd.c cmd_tools.c props.c settings.c cover.c prompt.c
C_FILES_OUT = $(C_FILES:.c=.o)
ifeq ($(OS),Windows_NT)
LIBS+= `pkg-config --libs glib-2.0` -lintl
endif
%.o: %.c
$(CC) -std=$(STD) -c -o $@ $< $(CFLAGS)
all: props.c $(C_FILES_OUT)
$(CC) -std=$(STD) -shared $(CFLAGS) -o $(PLUGNAME_PREFIX)_$(PLUGNAME).$(SUFFIX) $(C_FILES_OUT) $(LIBS)
install:
cp $(PLUGNAME_PREFIX)_$(PLUGNAME).$(SUFFIX) $(PREFIX)
properties_gen:
$(CC) -std=$(STD) $(CFLAGS) -o properties_gen properties_gen.c properties.c cmd_tools.c
props.c: properties_gen
./properties_gen
clean:
rm -fv $(PLUGNAME).o $(C_FILES_OUT) props.c props.h $(PLUGNAME_PREFIX)_$(PLUGNAME).$(SUFFIX)