Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 53f5888

Browse files
committed
makefile edit
1 parent a1fc93b commit 53f5888

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

‎Makefile‎

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,38 @@
1+
# 확장자 규칙
12
.SUFFIXES: .c .o
3+
.PHONY: clean
24

3-
TARGET = ssu_mntr
4-
CC = gcc
5-
CFLAGS = -g -Wall -Wextra -c
6-
INC =
5+
# Compiler
6+
CC = gcc
7+
# Compile option
8+
CFLAGS = -c -W -Wall -Wextra -g
79

8-
OBJECTS = support.o monitoring.o prompt.o ssu_mntr.o
10+
# Execute program file
11+
TARGET = ssu_mntr
12+
# Source file
913
SRCS = support.c monitoring.c prompt.c ssu_mntr.c
14+
# Object file
15+
OBJECTS = support.o monitoring.o prompt.o ssu_mntr.o
16+
# Header file
17+
HDRS = common.h monitoring.h prompt.h
1018

19+
# Execute program file generation
1120
$(TARGET): $(OBJECTS)
1221
$(CC) -o $(TARGET) $(OBJECTS)
1322

14-
$(OBJECTS): common.h monitoring.h prompt.h
23+
$(OBJECTS): $(HDRS)
1524
$(CC) $(CFLAGS) $(SRCS)
1625

17-
.c.o:
18-
$(cc) $(INC) $(CFLAGS)
26+
# .c|.o를 만날 경우
27+
#.c.o:
28+
# $(cc) $(CFLAGS) $(SRCS)
29+
30+
# make all
31+
all:
32+
$(TARGET) clean
1933

34+
# make clean
2035
clean:
21-
rm $(OBJECTS) $(TARGET)
36+
rm -rf $(OBJECTS) $(TARGET)
2237

2338

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /