29 lines
598 B
Makefile
29 lines
598 B
Makefile
|
TARGET1 = alix-usv
|
||
|
TARGET2 = alix-usvd
|
||
|
|
||
|
CFLAGS = -Wall -O2 -MD -MP -MF $(*F).d
|
||
|
|
||
|
# ------
|
||
|
|
||
|
SRC1 := alix-usv.c logging.c unixsocket.c
|
||
|
SRC2 := alix-usvd.c configfile.c event.c logging.c unixsocket.c
|
||
|
|
||
|
all: $(TARGET1) $(TARGET2)
|
||
|
|
||
|
$(TARGET1): $(SRC1:.c=.o)
|
||
|
@echo " Linking file: $@"
|
||
|
@$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) > /dev/null
|
||
|
|
||
|
$(TARGET2): $(SRC2:.c=.o)
|
||
|
@echo " Linking file: $@"
|
||
|
@$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) > /dev/null
|
||
|
|
||
|
%.o: %.c
|
||
|
@echo " Building file: $<"
|
||
|
@$(CC) -c $(CFLAGS) $< -o $@
|
||
|
|
||
|
clean:
|
||
|
rm -rf $(TARGET1) $(TARGET2) *.o *.d
|
||
|
|
||
|
-include $(shell find . -name \*.d 2> /dev/null)
|