* device/lib/pic16/Makefile.common.in,
[fw/sdcc] / sim / ucsim / cmd.src / Makefile.in
index b9364dfa9c06772ed16d80b8ec030cdc6850fd48..cf3f6580b1e865c1c49ed4af4cf273f2c6577083 100644 (file)
@@ -26,12 +26,14 @@ CPPFLAGS        = @CPPFLAGS@ -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) \
 CFLAGS          = @CFLAGS@ -Wall
 CXXFLAGS        = @CXXFLAGS@ -Wall
 M_OR_MM         = @M_OR_MM@
+WINSOCK_AVAIL  = @WINSOCK_AVAIL@
 
 prefix          = @prefix@
 exec_prefix     = @exec_prefix@
 bindir          = @bindir@
 libdir          = @libdir@
 datadir         = @datadir@
+datarootdir     = @datarootdir@
 includedir      = @includedir@
 mandir          = @mandir@
 man1dir         = $(mandir)/man1
@@ -40,12 +42,18 @@ infodir         = @infodir@
 srcdir          = @srcdir@
 VPATH           = @srcdir@
 
-OBJECTS                = cmdset.o command.o newcmd.o cmdutil.o syntax.o \
+OBJECTS                = cmdset.o command.o cmdutil.o syntax.o \
                  get.o set.o timer.o bp.o info.o show.o cmdgui.o cmdconf.o \
                  cmduc.o cmdstat.o cmdmem.o \
-                 cmdpars.o cmdlex.o
+                 cmdpars.o cmdlex.o newcmd.o
 
-DEVEL          = $(shell ( bash -c "test -e $(top_builddir)devel && echo yes" ))
+ifeq ($(WINSOCK_AVAIL), 1)
+OBJECTS += newcmdwin32.o
+else
+OBJECTS += newcmdposix.o
+endif
+
+DEVEL          = $(shell test -e $(top_builddir)/devel && echo yes)
 
 # Compiling entire program or any subproject
 # ------------------------------------------
@@ -86,7 +94,7 @@ installdirs:
 dep: Makefile.dep
 
 Makefile.dep: $(srcdir)/*.cc $(srcdir)/*.h
-       $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $^ >Makefile.dep
+       $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(addprefix $(srcdir)/, $(OBJECTS:.o=.cc)) >Makefile.dep
 
 include Makefile.dep
 include $(srcdir)/clean.mk
@@ -100,9 +108,9 @@ endif
 # My rules
 # --------
 
-cmdlib: $(top_builddir)libcmd.a
+cmdlib: $(top_builddir)/libcmd.a
 
-$(top_builddir)libcmd.a: $(OBJECTS)
+$(top_builddir)/libcmd.a: $(OBJECTS)
        ar -rcu $*.a $(OBJECTS)
        $(RANLIB) $*.a
 
@@ -129,7 +137,7 @@ endif
 # Remaking configuration
 # ----------------------
 checkconf:
-       @if [ -f $(top_builddir)devel ]; then\
+       @if [ -f $(top_builddir)/devel ]; then\
          $(MAKE) -f conf.mk srcdir="$(srcdir)" top_builddir="$(top_builddir)" freshconf;\
        fi