24 lines
367 B
Makefile
24 lines
367 B
Makefile
DEBUG?= -g
|
|
CFLAGS?= -O2 -Wall -W
|
|
CCOPT= $(CFLAGS)
|
|
|
|
OBJ = main.o skiplist.o x.o
|
|
PRGNAME = sl
|
|
|
|
all: sl
|
|
|
|
main.o: x.h skiplist.h x.c skiplist.c main.c
|
|
x.o: x.c x.h
|
|
skiplist.o: x.c x.h skiplist.c skiplist.h
|
|
|
|
sl: $(OBJ)
|
|
$(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ)
|
|
|
|
.c.o:
|
|
$(CC) -c $(CCOPT) $(DEBUG) $(COMPILE_TIME) $<
|
|
|
|
clean:
|
|
rm -rf $(PRGNAME) *.o
|
|
|
|
dep:
|
|
$(CC) -MM *.c
|