Skip to content

Commit dffb60d

Browse files
committed
initial commit
Organize the code. Declarations in functions.h, implementation in functions.c and program code in main.c. Also, included Makefile to build the program.
1 parent 6564a3d commit dffb60d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

chapter05/5-6/Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
CC = clang
2+
CFLAGS = -g -Wall -Wextra -Werror -pedantic-errors
3+
DEPS = functions.h
4+
TARGET = main
5+
OBJ = $(TARGET).o functions.o
6+
7+
%.o: %.cpp $(DEPS)
8+
$(CC) -c -o $@ $< $(CFLAGS)
9+
10+
$(TARGET): $(OBJ)
11+
$(CC) -o $@ $^ $(CFLAGS)
12+
13+
clean:
14+
rm -f *.o $(TARGET) $(TEST)

0 commit comments

Comments
 (0)