aboutsummaryrefslogtreecommitdiff
path: root/apps/examples/can/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'apps/examples/can/Makefile')
-rw-r--r--apps/examples/can/Makefile21
1 files changed, 12 insertions, 9 deletions
diff --git a/apps/examples/can/Makefile b/apps/examples/can/Makefile
index c6dc5af84..8924797e3 100644
--- a/apps/examples/can/Makefile
+++ b/apps/examples/can/Makefile
@@ -1,7 +1,7 @@
############################################################################
# apps/examples/can/Makefile
#
-# Copyright (C) 2011 Gregory Nutt. All rights reserved.
+# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -48,10 +48,14 @@ COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
+ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+ BIN = ..\..\libapps$(LIBEXT)
+else
ifeq ($(WINTOOL),y)
- BIN = "${shell cygpath -w $(APPDIR)/libapps$(LIBEXT)}"
+ BIN = ..\\..\\libapps$(LIBEXT)
else
- BIN = "$(APPDIR)/libapps$(LIBEXT)"
+ BIN = ../../libapps$(LIBEXT)
+endif
endif
ROOTDEPPATH = --dep-path .
@@ -76,9 +80,7 @@ $(COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
.built: $(OBJS)
- @( for obj in $(OBJS) ; do \
- $(call ARCHIVE, $(BIN), $${obj}); \
- done ; )
+ $(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
.context:
@@ -90,16 +92,17 @@ endif
context: .context
.depend: Makefile $(SRCS)
- @$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
+ @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
@touch $@
depend: .depend
clean:
- @rm -f *.o *~ .*.swp .built
+ $(call DELFILE, .built)
$(call CLEAN)
distclean: clean
- @rm -f Make.dep .depend
+ $(call DELFILE, Make.dep)
+ $(call DELFILE, .depend)
-include Make.dep