view Makefile @ 9:5e15d64a2d24 default tip

If somebody closed stdin, fd could be both valid and 0, don’t check for that.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 18 Aug 2015 02:09:55 +0100
parents f362b20de51e
children
line wrap: on
line source

#----- Fichier genere automatiquement sous Linux ------
#----- dim. févr. 22 01:38:49 CET 2015

#-----
INCDIR=.
CCFLAGS=-W -Wall -Werror -I$(INCDIR) -D_REENTRANT -g
LDFLAGS=
DEPOPT=-MM
CCC=cc
#-----

#-------------  Appli  --------------

TARGET=dspad_server

FILESdspad_server=ds.c \
	dspad.c \
	restartOp.c \
	service.c \
	uinput.c \
	XML.c

LDFLAGSdspad_server=$(LDFLAGS)

OBJECTSdspad_server=$(FILESdspad_server:.c=.o)

#-------------  Appli  --------------

all: $(TARGET)

#-------------  Appli  --------------

dspad_server : $(OBJECTSdspad_server)
	$(CCC) $(OBJECTSdspad_server) \
		-o dspad_server $(LDFLAGSdspad_server)
#------------------------------------

.c.o :
	$(CCC) $(CCFLAGS) -c $< \
		-o $*.o

dep :
	@echo "======== Mise a jour des dependances : .depend ========"
	@rm -f .depend
	@for i in *.c ; do \
	echo $$i ; \
	$(CCC) $(DEPOPT) $(CCFLAGS) $$i > .tmpdepend ; \
	OBJNAME=`echo $$i | sed -e s%\\\.c%.o% ` ; \
	cat .tmpdepend | \
	sed -e s%`basename $$i .c`\\\.o%$$OBJNAME%         >> .depend ; \
	echo  >> .depend ; \
	done
	@rm -f .tmpdepend

CLEANING=rm -f *.o core a.out $(TARGET) .depend
CONSEIL=echo Penser a faire : make -f Makefile dep

clear :
	@$(CLEANING)
	@echo
	@$(CONSEIL)
	@echo
clean :
	$(CLEANING)
	@echo
	@$(CONSEIL)
	@echo

sinclude .depend