File tree Expand file tree Collapse file tree 3 files changed +17
-17
lines changed Expand file tree Collapse file tree 3 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -253,9 +253,7 @@ LIBS += $(shell if [ -d post/board/$(BOARDDIR) ]; then echo \
253
253
"post/board/$(BOARDDIR ) /libpost$(BOARD ) .a"; fi)
254
254
LIBS += common/libcommon.a
255
255
LIBS += libfdt/libfdt.a
256
- ifeq ($(CONFIG_API ) ,y)
257
256
LIBS += api/libapi.a
258
- endif
259
257
260
258
LIBS := $(addprefix $(obj ) ,$(LIBS ) )
261
259
.PHONY : $(LIBS )
@@ -266,11 +264,8 @@ PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -
266
264
# The "tools" are needed early, so put this first
267
265
# Don't include stuff already done in $(LIBS)
268
266
SUBDIRS = tools \
269
- examples
270
-
271
- ifeq ($(CONFIG_API ) ,y)
272
- SUBDIRS += api_examples
273
- endif
267
+ examples \
268
+ api_examples
274
269
275
270
.PHONY : $(SUBDIRS )
276
271
Original file line number Diff line number Diff line change @@ -24,13 +24,12 @@ include $(TOPDIR)/config.mk
24
24
25
25
LIB = $(obj ) libapi.a
26
26
27
- COBJS = api.o api_net.o api_storage.o api_platform-$(ARCH ) .o
27
+ COBJS-$(CONFIG_API) + = api.o api_net.o api_storage.o api_platform-$(ARCH ) .o
28
28
29
+ COBJS := $(COBJS-y )
29
30
SRCS := $(COBJS:.o=.c )
30
31
OBJS := $(addprefix $(obj ) ,$(COBJS ) )
31
32
32
- all : $(LIB )
33
-
34
33
$(LIB ) : $(obj ) .depend $(OBJS )
35
34
$(AR ) $(ARFLAGS ) $@ $(OBJS )
36
35
Original file line number Diff line number Diff line change @@ -30,19 +30,25 @@ endif
30
30
31
31
include $(TOPDIR ) /config.mk
32
32
33
- ELF += demo
34
- BIN += demo.bin
33
+ ELF-$(CONFIG_API) += demo
34
+ BIN-$(CONFIG_API) += demo.bin
35
+ ELF := $(ELF-y )
36
+ BIN := $(BIN-y )
35
37
36
38
# CFLAGS += -v
37
39
38
- COBJS : = $(ELF:=.o )
39
- SOBJS : = crt0.o
40
+ COBJS-$(CONFIG_API) + = $(ELF:=.o )
41
+ SOBJS-$(CONFIG_API) + = crt0.o
40
42
ifeq ($(ARCH ) ,ppc)
41
- SOBJS += ppcstring.o
43
+ SOBJS-$(CONFIG_API) += ppcstring.o
42
44
endif
45
+ COBJS := $(COBJS-y )
46
+ SOBJS := $(SOBJS-y )
43
47
44
48
LIB = $(obj ) libglue.a
45
- LIBCOBJS = glue.o crc32.o ctype.o string.o vsprintf.o libgenwrap.o
49
+ LIBCOBJS-$(CONFIG_API) += glue.o crc32.o ctype.o string.o vsprintf.o \
50
+ libgenwrap.o
51
+ LIBCOBJS := $(LIBCOBJS-y )
46
52
47
53
LIBOBJS = $(addprefix $(obj ) ,$(SOBJS ) $(LIBCOBJS ) )
48
54
@@ -55,7 +61,7 @@ gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
55
61
56
62
CPPFLAGS += -I..
57
63
58
- all : $(obj ) .depend $(OBJS ) $(LIB ) $(BIN ) $(ELF )
64
+ all : $(obj ) .depend $(OBJS ) $(LIB ) $(ELF ) $(BIN )
59
65
60
66
# ########################################################################
61
67
$(LIB ) : $(obj ) .depend $(LIBOBJS )
You can’t perform that action at this time.
0 commit comments