blob: 77aa5e9c4bebd73984b60edb0ad8df0fc2a7572c (
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
include config.mk
-include $(DEPS)
all: $(TARGET) man
options:
@echo "$(PROJECT) build options:"
@echo "LIBS = $(LIBS)"
@echo "CC = $(CC)"
@echo "CFLAGS = $(CFLAGS)"
@echo "CPPFLAGS = $(CPPFLAGS)"
@echo "LDFLAGS = $(LDFLAGS)"
src/hints.o: src/hints.js.h
src/hints.js.h: src/hints.js
@echo "minify $<"
@cat $< | src/js2h.sh > $@
$(TARGET): $(OBJ)
@echo "$(CC) $@"
@$(CC) $(OBJ) -o $(TARGET) $(LDFLAGS)
%.o: %.c %.h src/config.h
@echo "${CC} $<"
@$(CC) -c -o $@ $< $(CPPFLAGS) $(CFLAGS)
debug: $(DTARGET)
$(DTARGET): $(DOBJ)
@echo "$(CC) $@"
@$(CC) $(DFLAGS) $(DOBJ) -o $(DTARGET) $(LDFLAGS)
%.do: %.c $(HEAD)
@echo "${CC} $<"
@$(CC) -c -o $@ $< $(CPPFLAGS) $(DFLAGS)
man:
@$(MAKE) $(MFLAGS) -C doc man
install: $(TARGET)
install -d $(BINDIR)
install -m 755 $(TARGET) $(BINDIR)
@$(MAKE) $(MFLAGS) -C doc install
uninstall:
$(RM) $(BINDIR)$(TARGET)
@$(MAKE) $(MFLAGS) -C doc uninstall
clean:
@$(MAKE) $(MFLAGS) -C doc clean
$(RM) src/*.o src/*.do src/hint.js.h $(TARGET) $(DTARGET)
dist: distclean
@echo "Creating tarball."
@git archive --format tar -o $(DIST_FILE) HEAD
distclean:
$(RM) $(DIST_FILE)
.PHONY: clean debug all install uninstall options dist
|