Blame view

Makefile 1.05 KB
be97847d   achemin1   Amélioration Make...
1
2
3
4
5
6
7
  BIN = bin
  OBJ = obj
  SRC = src
  INCLUDE = include
  CFLAGS =
  CLIBS = -lusb-1.0
  GNUMAKEFLAGS = --no-print-directory
ec8ed377   gperson   ajout de correcti...
8
9
10
  
  
  
be97847d   achemin1   Amélioration Make...
11
  VERBOSE_THRESHOLD?=3
ec8ed377   gperson   ajout de correcti...
12
  
be97847d   achemin1   Amélioration Make...
13
14
15
16
17
18
19
  RELEASE?=0
  ifeq ($(RELEASE), 1)
  	CFLAGS = -W -Wall
  	VERBOSE_THRESHOLD = 0
  else
  	CFLAGS = -W -Wall -g -O0
  endif
89ecd36e   gperson   Creation du makefile
20
  
ec8ed377   gperson   ajout de correcti...
21
22
  
  
be97847d   achemin1   Amélioration Make...
23
24
25
26
  all : main demostep
  
  
  
b24d2980   achemin1   Nettoyage du code...
27
28
29
  main : libusb_wrapper ${SRC}/main.c
  	gcc -o ${OBJ}/$@.o -c ${SRC}/$@.c -I ${INCLUDE} ${CLIBS} ${CFLAGS}
  	gcc -o ${BIN}/$@.out ${OBJ}/main.o ${OBJ}/libusb_wrapper.o ${CFLAGS} ${CLIBS}
be97847d   achemin1   Amélioration Make...
30
31
32
  
  demostep : STEP4.1
  
be97847d   achemin1   Amélioration Make...
33
34
35
  STEP4.1 : ${SRC}/GetUsbInfos.c bin
  	gcc -o ${BIN}/STEP4.1.out ${SRC}/GetUsbInfos.c ${CLIBS} ${CFLAGS}
  
3cacbf71   gperson   Ajout des questio...
36
37
  STEP4.2 : ${SRC}/FourPointTwo.c bin
  	gcc -o ${BIN}/STEP4.2.out ${SRC}/FourPointTwo.c ${CLIBS} ${CFLAGS}
be97847d   achemin1   Amélioration Make...
38
  
3cacbf71   gperson   Ajout des questio...
39
40
  STEP4.3 : ${SRC}/FourPointThree.c bin
  	gcc -o ${BIN}/STEP4.3.out ${SRC}/FourPointThree.c ${CLIBS} ${CFLAGS}
be97847d   achemin1   Amélioration Make...
41
  
b24d2980   achemin1   Nettoyage du code...
42
43
44
45
46
47
48
49
  
  libs: libusb_wrapper
  
  libusb_wrapper: obj ${SRC}/libusb_wrapper.c ${INCLUDE}/libusb_wrapper.h
  	gcc -o ${OBJ}/$@.o -c ${SRC}/$@.c -I ${INCLUDE} ${CLIBS} ${CFLAGS}
  
  
  
be97847d   achemin1   Amélioration Make...
50
51
52
53
54
55
56
57
58
59
60
61
  obj :
  	@-mkdir ${OBJ}
  
  bin :
  	@-mkdir ${BIN}
  
  clean :
  	rm -rf obj/*.o
  
  mrproper: clean
  	rm -rf bin
  	rm -rf obj