blob: 0d617669a057a02225bf465b512e4b2863fe2c20 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
PROJECT=microbbs
CC=gcc
CFLAGS=
SOURCES=motd.c buildinfo.c sysinfo.c articles.c logs.c vote.c list.c mmm.c
OBJECTS=$(SOURCES:.c=.o)
BUILD_DIR=build_dir
all: mkdir $(OBJECTS) $(PROJECT)
mkdir:
mkdir -p $(BUILD_DIR)
$(PROJECT): $(SOURCES)
cd ./libterm; make
$(CC) $(addprefix $(BUILD_DIR)/,$(OBJECTS)) $(CFLAGS) libterm/libterm.o microbbs.c -o $(PROJECT)
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $(BUILD_DIR)/$@
clean:
rm -rf *.o microbbs
cd ./$(BUILD_DIR); rm -rf *.o
cd ./libterm; make clean
|