sandbox-c/file2char/makefile

23 lines
379 B
Makefile
Raw Normal View History

2023-01-20 11:44:46 +01:00
#target: dependency_1 dependency_2 dependency_3 ...
# command
#
RM = /bin/rm -f
2023-01-20 14:08:59 +01:00
OBJ = main.o file2char.o
2023-01-20 11:44:46 +01:00
EXE = main
CC = /usr/bin/gcc
CFLAGS = -Wall
#
all: $(EXE)
#
$(EXE): $(OBJ)
$(CC) $(CFLAGS) $(OBJ) -o $(EXE)
#
2023-01-20 14:08:59 +01:00
file2char.o: file2char.c file2char.h
$(CC) -c file2char.c -o file2char.o
#
main.o: main.c file2char.h
2023-01-20 11:44:46 +01:00
$(CC) -c main.c -o main.o
#
clean:
$(RM) $(OBJ) $(EXE) *~