summaryrefslogtreecommitdiff
path: root/src/Makefile
blob: 6ca4e5e33a6c1e127c1bc151e6e9b8ee34463ccb (plain)
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
42
43
include ../config.mk

OBJ = $(patsubst %.c, %.o, $(wildcard *.c))

all: vimb webextension.subdir-all

clean: webextension.subdir-clean
	$(RM) vimb $(OBJ)

vimb: $(OBJ)
	@echo "${CC} $@"
	$(Q)$(CC) $(OBJ) $(LDFLAGS) -o $@

vimb.so: $(OBJ)
	$(Q)$(CC) -shared $(OBJ) $(LDFLAGS) -o $@

$(OBJ): config.h ../config.mk

input.o: scripts/scripts.h

normal.o: scripts/scripts.h

setting.o: scripts/scripts.h

scripts/scripts.h: scripts.subdir-all

config.h:
	@echo create $@ from config.def.h
	$(Q)cp config.def.h $@

%.o: %.c
	@echo "${CC} $@"
	$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<

%.subdir-all: config.h
	$(Q)$(MAKE) -C $*

%.subdir-clean:
	$(Q)$(MAKE) -C $* clean

-include $(OBJ:.o=.d)

.PHONY: all clean