Blame view

Librairies/Exemple/Network/Makefile 474 Bytes
0ae69087   pfrison   Ajout des fichiers
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
  TARGET=libnet
  DIR_TARGET=../libs
  CFLAGS=-Wall -pedantic -Wextra -I $(DIR_TARGET)
  CLIB=ar cq
  CC=gcc
  
  all: $(TARGET).a
  
  debug: CFLAGS += -g -DDEBUG
  debug: all
  
  clean:
  	rm -f *.o *.a
  	rm -f $(DIR_TARGET)/$(TARGET).a
  	rm -f $(DIR_TARGET)/$(TARGET).h
  
  $(TARGET).o: $(TARGET).c $(TARGET).h
  	$(CC) -c $(CFLAGS) -o $@ $<
  
  $(TARGET).a: $(TARGET).o
  	rm -rf $@
  	$(CLIB) $@ $+
  	mkdir $(DIR_TARGET) -p
  	cp $(TARGET).a $(DIR_TARGET)/$(TARGET).a
  	cp $(TARGET).h $(DIR_TARGET)/$(TARGET).h