Blame view

Makefile 1014 Bytes
be97847d   achemin1   Amélioration Make...
1
2
3
4
5
  BIN = bin
  OBJ = obj
  SRC = src
  INCLUDE = include
  CFLAGS =
f6896773   achemin1   Prise en charge d...
6
  CLIBS = -lusb-1.0 -I"C:\Program Files\zLib\libusb-1.0.23\include" -B"C:\Program Files\zLib\libusb-1.0.23\MinGW32\static"
be97847d   achemin1   Amélioration Make...
7
  GNUMAKEFLAGS = --no-print-directory
ec8ed377   gperson   ajout de correcti...
8
  
f6896773   achemin1   Prise en charge d...
9
10
  gcc = gcc
  gcc := "/mnt/c/Program Files (x86)/mingw-w64/i686-8.1.0-posix-dwarf-rt_v6-rev0/mingw32/bin/gcc.exe"
ec8ed377   gperson   ajout de correcti...
11
12
  
  
be97847d   achemin1   Amélioration Make...
13
  VERBOSE_THRESHOLD?=3
ec8ed377   gperson   ajout de correcti...
14
  
7e2160f8   achemin1   Ajout du mode debug
15
16
  DEBUG?=0
  ifeq ($(DEBUG), 0)
be97847d   achemin1   Amélioration Make...
17
18
19
  	CFLAGS = -W -Wall
  	VERBOSE_THRESHOLD = 0
  else
7e2160f8   achemin1   Ajout du mode debug
20
  	CFLAGS = -W -Wall -g -O0 -DDEBUG
be97847d   achemin1   Amélioration Make...
21
  endif
89ecd36e   gperson   Creation du makefile
22
  
ec8ed377   gperson   ajout de correcti...
23
24
  
  
f6896773   achemin1   Prise en charge d...
25
  all : main
be97847d   achemin1   Amélioration Make...
26
27
  
  
f6896773   achemin1   Prise en charge d...
28
29
  version :
  	${gcc} -v
be97847d   achemin1   Amélioration Make...
30
  
b24d2980   achemin1   Nettoyage du code...
31
  main : libusb_wrapper ${SRC}/main.c
f6896773   achemin1   Prise en charge d...
32
33
  	${gcc} -o ${OBJ}/$@.o -c ${SRC}/$@.c -I ${INCLUDE} ${CLIBS} ${CFLAGS}
  	${gcc} -o ${BIN}/$@.exe ${OBJ}/main.o ${OBJ}/libusb_wrapper.o ${CFLAGS} ${CLIBS}
be97847d   achemin1   Amélioration Make...
34
  
f6896773   achemin1   Prise en charge d...
35
36
  demostep : main
  	${BIN}/main.exe demo4.1
b24d2980   achemin1   Nettoyage du code...
37
38
39
40
  
  libs: libusb_wrapper
  
  libusb_wrapper: obj ${SRC}/libusb_wrapper.c ${INCLUDE}/libusb_wrapper.h
f6896773   achemin1   Prise en charge d...
41
  	${gcc} -o ${OBJ}/$@.o -c ${SRC}/$@.c -I ${INCLUDE} ${CLIBS} ${CFLAGS}
b24d2980   achemin1   Nettoyage du code...
42
43
44
  
  
  
be97847d   achemin1   Amélioration Make...
45
46
47
48
49
50
51
52
53
54
55
56
  obj :
  	@-mkdir ${OBJ}
  
  bin :
  	@-mkdir ${BIN}
  
  clean :
  	rm -rf obj/*.o
  
  mrproper: clean
  	rm -rf bin
  	rm -rf obj