Subversion Repositories freemyipod

Rev

Rev 898 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 898 Rev 915
Line 1... Line 1...
1
GCC ?= gcc
1
GCC ?= gcc
2
CFLAGS += -O2 -Wall -Wextra -Werror $(shell pkg-config --cflags --libs libusb-1.0 fuse)
2
CFLAGS += -O2 -Wall -Wextra -Werror $(shell pkg-config --cflags libusb-1.0 fuse)
-
 
3
LIBS = $(shell pkg-config --libs libusb-1.0 fuse)
3
 
4
 
4
SOURCES_COMMON = util.c usb.c emcore.c cache.c fuse.c
5
SOURCES_COMMON = util.c usb.c emcore.c cache.c fuse.c
5
SOURCES_EMCOREFS = emcorefs.c
6
SOURCES_EMCOREFS = emcorefs.c
6
SOURCES_EMCORE_TEST = emcore-test.c
7
SOURCES_EMCORE_TEST = emcore-test.c
7
 
8
 
Line 11... Line 12...
11
 
12
 
12
all: $(TARGETS)
13
all: $(TARGETS)
13
 
14
 
14
$(TARGET_EMCOREFS): $(SOURCES_COMMON) $(SOURCES_EMCOREFS)
15
$(TARGET_EMCOREFS): $(SOURCES_COMMON) $(SOURCES_EMCOREFS)
15
	@mkdir -p build
16
	@mkdir -p build
16
	$(GCC) $(CFLAGS) -o $(TARGET_EMCOREFS) $(SOURCES_COMMON) $(SOURCES_EMCOREFS)
17
	$(GCC) $(CFLAGS) -o $(TARGET_EMCOREFS) $(SOURCES_COMMON) $(SOURCES_EMCOREFS) $(LIBS)
17
 
18
 
18
debug: $(SOURCES_COMMON) $(SOURCES_EMCOREFS)
19
debug: $(SOURCES_COMMON) $(SOURCES_EMCOREFS)
19
	@mkdir -p build
20
	@mkdir -p build
20
	$(GCC) $(CFLAGS) -DDEBUG -g -o $(TARGET_EMCOREFS) $(SOURCES_COMMON) $(SOURCES_EMCOREFS)
21
	$(GCC) $(CFLAGS) -DDEBUG -g -o $(TARGET_EMCOREFS) $(SOURCES_COMMON) $(SOURCES_EMCOREFS) $(LIBS)
21
 
22
 
22
$(TARGET_EMCORE_TEST): $(SOURCES_COMMON) $(SOURCES_EMCORE_TEST)
23
$(TARGET_EMCORE_TEST): $(SOURCES_COMMON) $(SOURCES_EMCORE_TEST)
23
	@mkdir -p build
24
	@mkdir -p build
24
	$(GCC) $(CFLAGS) -DDEBUG -DDEBUG_USB_PACKETS -g -o $(TARGET_EMCORE_TEST) $(SOURCES_COMMON) $(SOURCES_EMCORE_TEST)
25
	$(GCC) $(CFLAGS) -DDEBUG -DDEBUG_USB_PACKETS -g -o $(TARGET_EMCORE_TEST) $(SOURCES_COMMON) $(SOURCES_EMCORE_TEST) $(LIBS)
25
 
26
 
26
clean:
27
clean:
27
	@rm -rf build
28
	@rm -rf build