update makefile
This commit is contained in:
parent
2aefa0cd45
commit
7a9c40b1e5
26
Makefile
26
Makefile
@ -1,20 +1,22 @@
|
|||||||
CFLAGS := -O2 -pipe -Wall
|
TARGET = telnetproxy
|
||||||
|
|
||||||
OBJS := configfile.o connection.o event.o logging.o tcpsocket.o sockaddr.o
|
CFLAGS = -Wall -O2 -MD -MP -MF $(*F).d
|
||||||
|
|
||||||
all: telnetproxy
|
# ------
|
||||||
|
|
||||||
telnetproxy: $(OBJS) telnetproxy.o
|
SRC := $(wildcard *.c)
|
||||||
$(CC) $(CFLAGS) $^ -o $@
|
|
||||||
|
all: $(TARGET)
|
||||||
|
|
||||||
|
$(TARGET): $(SRC:.c=.o)
|
||||||
|
@echo " Linking file: $@"
|
||||||
|
@$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) > /dev/null
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
@echo " Building file: $<"
|
||||||
|
@$(CC) -c $(CFLAGS) $< -o $@
|
||||||
%.d: %.c
|
|
||||||
$(CC) $(CFLAGS) -MM -c $< -o $@
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f telnetproxy *.d *.o *.log
|
rm -rf $(TARGET) *.o *.d
|
||||||
|
|
||||||
DEPS := $(wildcard *.c)
|
-include $(shell find -name *.d 2> /dev/null)
|
||||||
-include $(DEPS:.c=.d)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user