Simplify Makefile
This commit is contained in:
parent
6f85b2aaf2
commit
9fddfbda61
15
Makefile
15
Makefile
@ -3,13 +3,16 @@ NDHC_OBJS = $(NDHC_SRCS:.c=.o)
|
||||
NDHC_DEP = $(NDHC_SRCS:.c=.d)
|
||||
INCL = -I.
|
||||
|
||||
CC ?= gcc
|
||||
CFLAGS = -MMD -O2 -s -std=gnu99 -pedantic -Wall -Wextra -Wimplicit-fallthrough=0 -Wformat=2 -Wformat-nonliteral -Wformat-security -Wshadow -Wpointer-arith -Wmissing-prototypes -Wunused-const-variable=0 -Wcast-qual -Wsign-conversion -D_GNU_SOURCE -DNK_USE_CAPABILITY -Wno-discarded-qualifiers
|
||||
|
||||
-include $(NDHC_DEP)
|
||||
CPPFLAGS += $(INCL)
|
||||
|
||||
all: ragel ndhc
|
||||
|
||||
ndhc: $(NDHC_OBJS)
|
||||
$(CC) $(CFLAGS) $(INCL) -o $@ $^
|
||||
|
||||
-include $(NDHC_DEP)
|
||||
|
||||
clean:
|
||||
rm -f $(NDHC_OBJS) $(NDHC_DEP) ndhc
|
||||
|
||||
@ -24,11 +27,5 @@ cfg.c:
|
||||
|
||||
ragel: ifchd-parse.c cfg.c
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) $(INCL) -c -o $@ $^
|
||||
|
||||
ndhc: $(NDHC_OBJS)
|
||||
$(CC) $(CFLAGS) $(INCL) -o $@ $^
|
||||
|
||||
.PHONY: all clean cleanragel
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user