1 FORTUNEAPP_DIR
= $(APPS_DIR
)/fortune
2 FORTUNEAPP_OBJ_DIR
= $(FORTUNEAPP_DIR
)/$(OBJ_DIR
)
4 $(FORTUNEAPP_OBJ_DIR
)/main.o
6 DEPS
+= $(FORTUNEAPP_OBJS
:.o
=.d
)
8 FORTUNEAPP
= $(FORTUNEAPP_OBJ_DIR
)/fortune
10 $(FORTUNEAPP
): $(FORTUNEAPP_OBJS
) $(LIBS
) $(GLUE
)
11 $(LD
) --script
=$(APPS_LDSCRIPT
) -L
$(LIBGCC_PATH
) -o
$@
$(GLUE
) $(FORTUNEAPP_OBJS
) $(LINK_LIBS
) $(LIBGCC
)
14 rm -f
$(FORTUNEAPP_OBJS
) $(FORTUNEAPP
)
18 APPS_CLEAN
+= fortuneappclean
20 $(FORTUNEAPP_OBJ_DIR
)/%.o
: $(FORTUNEAPP_DIR
)/%.c
21 @if
[ ! -d
$(FORTUNEAPP_OBJ_DIR
) ]; then mkdir
-p
$(FORTUNEAPP_OBJ_DIR
); fi
22 @mkdir
-p
$(FORTUNEAPP_OBJ_DIR
)
23 $(CC
) -c
$< $(APPS_CFLAGS
) $(APPS_INCLUDES
) -o
$@
25 $(FORTUNEAPP_OBJ_DIR
)/%.d
: $(FORTUNEAPP_DIR
)/%.c
26 @if
[ ! -d
$(FORTUNEAPP_OBJ_DIR
) ]; then mkdir
-p
$(FORTUNEAPP_OBJ_DIR
); fi
27 @echo
"making deps for $<..."
28 @
($(ECHO
) -n
$(dir $@
); $(CC
) $(APPS_CFLAGS
) $(APPS_INCLUDES
) -M
-MG
$<) > $@