-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (21 loc) · 695 Bytes
/
Makefile
File metadata and controls
32 lines (21 loc) · 695 Bytes
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
CC=gcc
CFLAGS=-std=c99 -Wall -Wextra -Wpedantic
LDLIBS=
SRCS=libsigscan.c main.c external-test.c
OBJS=$(addprefix obj/, $(addsuffix .o, $(SRCS)))
BIN1=libsigscan-test.out
BIN2=libsigscan-test-external.out
#-------------------------------------------------------------------------------
.PHONY: all clean
all: $(BIN1) $(BIN2)
clean:
rm -f $(OBJS)
rm -f $(BIN1) $(BIN2)
#-------------------------------------------------------------------------------
$(BIN1): obj/main.c.o obj/libsigscan.c.o
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS)
$(BIN2): obj/external-test.c.o obj/libsigscan.c.o
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS)
obj/%.c.o : src/%.c
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) -o $@ -c $<