25 lines
425 B
Makefile
25 lines
425 B
Makefile
DEBUG?= -g
|
|
CFLAGS?= -O2 -Wall -W -DSDS_ABORT_ON_OOM
|
|
CCOPT= $(CFLAGS)
|
|
|
|
OBJ = main.o skiplist.o x.o
|
|
PRGNAME = sl
|
|
|
|
all: sl
|
|
|
|
# Deps (use make dep to generate this)
|
|
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
|