blob: 1ea23d60ecd8d8363ecc732f055ca52fcab96796 (
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
|
include config.mk
all: $(TARGET)
-include $(DEPS)
options:
@echo "$(PROJECT) build options:"
@echo "LIBS = $(LIBS)"
@echo "CC = $(CC)"
@echo "CFLAGS = $(CFLAGS)"
@echo "CPPFLAGS = $(CPPFLAGS)"
@echo "LDFLAGS = $(LDFLAGS)"
all: $(TARGET)
$(TARGET): $(OBJ)
@echo "$(CC) $@"
@$(CC) $(OBJ) -o $(TARGET) $(LDFLAGS)
%.o: %.c $(HEAD)
@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)
clean:
$(RM) $(OBJ) $(DOBJ) $(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
|