-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (34 loc) · 943 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Comment/uncomment the following line to disable/enable debugging
#DEBUG = y
# This Makefile has been simplified as much as possible, by putting all
# generic material, independent of this specific directory, into
# /Rules.make. Read that file for details
#TOPDIR := $(shell cd ..; pwd)
#include $(TOPDIR)/Rules.make
include ./Rules.make
# Add your debugging flag (or not) to CFLAGS
ifeq ($(DEBUG),y)
DEBFLAGS = -O -g -DLKHP_DEBUG # "-O" is needed to expand inlines
else
#DEBFLAGS = -O2 -g
DEBFLAGS = -O -g
endif
CFLAGS += $(DEBFLAGS)
CFLAGS += -Iinclude
TARGET = LKHP
OBJS = $(TARGET).o
#SRC = main.c pipe.c access.c
SRC = main.c lkhp.c
all: .depend $(TARGET).o
$(TARGET).o: $(SRC:.c=.o)
$(LD) -r $^ -o $@
install:
install -d $(INSTALLDIR)
install -c $(TARGET).o $(INSTALLDIR)
clean:
rm -f *.o *~ core .depend
depend .depend dep:
$(CC) $(CFLAGS) -M *.c > $@
ifeq (.depend,$(wildcard .depend))
include .depend
endif