blob: 898378ead30d0e54c75ce1e380391fb4f62f6d7a (
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
|
TARGET = generate
LIBS =
CC = gcc
CFLAGS = -std=c99 -g -Wall -Werror -Wno-unused-variable
.PHONY: default all clean
default: mkdirs $(TARGET)
all: default
OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c))
HEADERS = $(wildcard *.h)
%.o: %.c $(HEADERS)
$(CC) $(CFLAGS) -c $< -o $@
.PRECIOUS: $(TARGET) $(OBJECTS)
$(TARGET): $(OBJECTS)
$(CC) $(OBJECTS) -Wall $(LIBS) -o $@
clean:
-rm -f *.o
-rm -f *.tmp
-rm -f $(TARGET)
-rm -rf output/
mkdirs:
mkdir -p {output/posts/direct,output/opinions}
|