-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
53 lines (36 loc) · 1.1 KB
/
makefile
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
CC ?= gcc
CXX ?= g++
CPP ?= g++
APP_NAME_PIPE_SIMPLE = pipes
OBJ_FILES_PIPE_SIMPLE = pipes.o
APP_NAME_PIPE_PROCESS= pipes_process
OBJ_FILES_PIPE_PROCESS= pipes_process.o
APP_NAME_MKFIFO_2= mkfifo_2
OBJ_FILES_MKFIFO_2 = mkfifo_2.o
APP_NAME_MKFIFO= mkfifo
OBJ_FILES_MKFIFO = mkfifo.o
APP_NAME_SHRMEM= share_mem
OBJ_FILES_SHRMEM = share_mem.o
APP_NAME_SHRMEM2= share_mem2
OBJ_FILES_SHRMEM2 = share_mem2.o
LIBS = .
all: $(APP_NAME_PIPE_SIMPLE) $(APP_NAME_PIPE_PROCESS) $(APP_NAME_MKFIFO_2) $(APP_NAME_MKFIFO) $(APP_NAME_SHRMEM2) $(APP_NAME_SHRMEM)
$(APP_NAME_PIPE_SIMPLE): $(OBJ_FILES_PIPE_SIMPLE)
$(CC) -o $@ $^
$(APP_NAME_PIPE_PROCESS): $(OBJ_FILES_PIPE_PROCESS)
$(CC) -o $@ $^
$(APP_NAME_MKFIFO): $(OBJ_FILES_MKFIFO)
$(CC) -o $@ $^
$(APP_NAME_MKFIFO_2): $(OBJ_FILES_MKFIFO_2)
$(CC) -o $@ $^
$(APP_NAME_SHRMEM): $(OBJ_FILES_SHRMEM)
$(CC) -o $@ $^
$(APP_NAME_SHRMEM2): $(OBJ_FILES_SHRMEM2)
$(CC) -o $@ $^
%.o: %.c
$(CC) -o $@ -c $^ -g
clean:
rm *.o $(APP_NAME_PIPE_SIMPLE) $(APP_NAME_PIPE_PROCESS) $(APP_NAME_MKFIFO_2) $(APP_NAME_MKFIFO) $(APP_NAME_SHRMEM) $(APP_NAME_SHRMEM2)
fresh:
make clean
make all