summaryrefslogtreecommitdiff
path: root/nuttx/configs/sim/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/configs/sim/src/Makefile')
-rw-r--r--nuttx/configs/sim/src/Makefile27
1 files changed, 18 insertions, 9 deletions
diff --git a/nuttx/configs/sim/src/Makefile b/nuttx/configs/sim/src/Makefile
index 6b2a7a467..594942765 100644
--- a/nuttx/configs/sim/src/Makefile
+++ b/nuttx/configs/sim/src/Makefile
@@ -1,7 +1,7 @@
############################################################################
# configs/sim/src/Makefile
#
-# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
+# Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# Redistribution and use in source and binary forms, with or without
@@ -33,17 +33,23 @@
#
############################################################################
--include $(TOPDIR)/Make.defs
+include $(TOPDIR)/Make.defs
-CFLAGS += -I$(TOPDIR)/sched
+CFLAGS += -I$(TOPDIR)/sched
-ASRCS =
-AOBJS = $(ASRCS:.S=$(OBJEXT))
-CSRCS =
-COBJS = $(CSRCS:.c=$(OBJEXT))
+ASRCS =
+AOBJS = $(ASRCS:.S=$(OBJEXT))
-SRCS = $(ASRCS) $(CSRCS)
-OBJS = $(AOBJS) $(COBJS)
+CSRCS =
+ifeq ($(CONFIG_SIM_X11FB),y)
+ifeq ($(CONFIG_SIM_TOUCHSCREEN),y)
+ CSRCS += up_touchscreen.c
+endif
+endif
+COBJS = $(CSRCS:.c=$(OBJEXT))
+
+SRCS = $(ASRCS) $(CSRCS)
+OBJS = $(AOBJS) $(COBJS)
all: libboard$(LIBEXT)
@@ -54,9 +60,12 @@ $(COBJS) $(LINKOBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
libboard$(LIBEXT): $(OBJS)
+ @$(AR) $@ # Create an empty archive
+ifneq ($(OBJS),)
@( for obj in $(OBJS) ; do \
$(call ARCHIVE, $@, $${obj}); \
done ; )
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep