19 lines
279 B
Makefile
19 lines
279 B
Makefile
|
CC = gcc
|
||
|
CFLAGS = -Wall -g
|
||
|
TARGET = train
|
||
|
|
||
|
all: $(TARGET)
|
||
|
|
||
|
$(TARGET): main.o a_train.o
|
||
|
$(CC) $(CFLAGS) -o $(TARGET) main.o a_train.o
|
||
|
|
||
|
main.o: main.c a_train.h
|
||
|
$(CC) $(CFLAGS) -c main.c
|
||
|
|
||
|
a_train.o: a_train.c a_train.h
|
||
|
$(CC) $(CFLAGS) -c a_train.c
|
||
|
|
||
|
clean:
|
||
|
rm -f *.o $(TARGET)
|
||
|
|