Blame view

Makefile 779 Bytes
ae25085d   henyxia   Output function done
1
  CC=gcc
cdaa873f   henyxia   Log fixed
2
  CC_FLAGS=-c -Wall -Werror -std=gnu99 -g
9c066355   henyxia   USB Initialized
3
  CC_LIBS=-pthread -lusb-1.0
ae25085d   henyxia   Output function done
4
  INCLUDES=
e583b6a9   henyxia   First version
5
  
9c066355   henyxia   USB Initialized
6
  SOURCES=main.c printx.c ui.c serial.c nfc.c bus.c hvc.c heat.c pump.c usb.c
8ecde263   henyxia   Added main view
7
  BMP=img/home.bmp img/main.bmp
5a135e77   henyxia   MAP Files generated
8
  MAP_SRC=map/main.bmp
e583b6a9   henyxia   First version
9
  OBJECTS=$(SOURCES:.c=.o)
5a135e77   henyxia   MAP Files generated
10
11
12
  BOZ=$(MAP_SRC:.bmp=.boz)
  #BOZ=$(patsubst %_map.bmp,%.boz,$(MAP_SRC))
  MAP=$(BOZ:.boz=.map)
ef5bbf07   henyxia   Automatic BMP gen...
13
14
  BMPR=$(BMP:.bmp=.bmpr)
  RGB=$(BMPR:.bmpr=.rgb)
e583b6a9   henyxia   First version
15
16
  OUTPUT=tweekd
  
5a135e77   henyxia   MAP Files generated
17
  all: $(SOURCES) pictures $(OUTPUT)
ef5bbf07   henyxia   Automatic BMP gen...
18
  
5a135e77   henyxia   MAP Files generated
19
20
21
  pictures: $(MAP_SRC) $(BMP) $(MAP) $(RGB)
  
  $(OUTPUT): $(OBJECTS) $(MAP)
8ecde263   henyxia   Added main view
22
23
24
25
26
  	$(CC) $(OBJECTS) $(CC_LIBS) -o $@
  
  %.o: %.c
  	$(CC) $(INCLUDES) $(CC_FLAGS) $< -o $@
  
8ecde263   henyxia   Added main view
27
  %.rgb: %.bmpr
ef5bbf07   henyxia   Automatic BMP gen...
28
29
  	bmp2rgb565 $< $@
  
5a135e77   henyxia   MAP Files generated
30
31
32
33
34
35
36
37
  %.boz: %.bmp
  	convert -flip $< $@
  
  %.bmpr: %.bmp
  	convert -flip $< $@
  
  %.map: %.boz
  	bmp2map $< $@
e583b6a9   henyxia   First version
38
  
e583b6a9   henyxia   First version
39
  clear:
ef5bbf07   henyxia   Automatic BMP gen...
40
  	rm -f $(OUTPUT) $(OBJECTS) $(BOZ) $(BMPR) $(MAP) $(RGB)