projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 0.3.2-pre1
[fw/sdcc]
/
sim
/
ucsim
/
main_in.mk
diff --git
a/sim/ucsim/main_in.mk
b/sim/ucsim/main_in.mk
index e7c34297b9d629b4be5d09953c93fe0d1738c3cb..1a1de04992b8ffcb97867b8c64453e549a2a1514 100644
(file)
--- a/
sim/ucsim/main_in.mk
+++ b/
sim/ucsim/main_in.mk
@@
-14,14
+14,19
@@
RANLIB = @RANLIB@
INSTALL = @INSTALL@
PRJDIR = .
INSTALL = @INSTALL@
PRJDIR = .
+SIMDIR = sim.src
DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
# FIXME: -Imcs51 must be removed!!!
DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
# FIXME: -Imcs51 must be removed!!!
-CPPFLAGS = @CPPFLAGS@ -I$(PRJDIR)
+CPPFLAGS = @CPPFLAGS@ -I$(PRJDIR)
-I$(PRJDIR)/$(SIMDIR)
CFLAGS = @CFLAGS@ -I$(PRJDIR) -Wall
CXXFLAGS = @CXXFLAGS@ -I$(PRJDIR) -Wall
M_OR_MM = @M_OR_MM@
CFLAGS = @CFLAGS@ -I$(PRJDIR) -Wall
CXXFLAGS = @CXXFLAGS@ -I$(PRJDIR) -Wall
M_OR_MM = @M_OR_MM@
+LIB_LIST = sim cmd sim util
+UCSIM_LIBS = $(patsubst %,-l%,$(LIB_LIST))
+UCSIM_LIB_FILES = $(patsubst %,lib%.a,$(LIB_LIST))
+
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
@@
-35,6
+40,10
@@
infodir = @infodir@
srcdir = @srcdir@
OBJECTS = pobj.o globals.o utils.o
srcdir = @srcdir@
OBJECTS = pobj.o globals.o utils.o
+SOURCES = $(patsubst %.o,%.cc,$(OBJECTS))
+UCSIM_OBJECTS = ucsim.o
+UCSIM_SOURCES = $(patsubst %.o,%.cc,$(UCSIM_OBJECTS))
+ALL_SOURCES = $(SOURCES) $(UCSIM_SOURCES)
# Compiling entire program or any subproject
# Compiling entire program or any subproject
@@
-43,6
+52,8
@@
all: checkconf libs
libs: libutil.a
libs: libutil.a
+main_app: checkconf ucsim_app
+
# Compiling and installing everything and runing test
# ---------------------------------------------------
install: all installdirs
# Compiling and installing everything and runing test
# ---------------------------------------------------
install: all installdirs
@@
-76,8
+87,8
@@
installdirs:
# ---------------------
dep: main.dep
# ---------------------
dep: main.dep
-main.dep:
*.cc
*.h
- $(CXXCPP) $(CPPFLAGS) $(M_OR_MM)
*.cc
>main.dep
+main.dep:
$(ALL_SOURCES)
*.h
+ $(CXXCPP) $(CPPFLAGS) $(M_OR_MM)
$(ALL_SOURCES)
>main.dep
include main.dep
include clean.mk
include main.dep
include clean.mk
@@
-88,11
+99,16
@@
include clean.mk
# My rules
# --------
# My rules
# --------
-
libutil.a: $(OBJECTS)
ar -rcu $*.a $(OBJECTS)
$(RANLIB) $*.a
libutil.a: $(OBJECTS)
ar -rcu $*.a $(OBJECTS)
$(RANLIB) $*.a
+ucsim_app: libs ucsim
+
+ucsim: $(UCSIM_OBJECTS) $(UCSIM_LIB_FILES)
+ echo $(UCSIM_LIB_FILES)
+ $(CXX) $(CXXFLAGS) -o $@ $< -L$(PRJDIR) $(UCSIM_LIBS)
+
.cc.o:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
.cc.o:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
@@
-111,6
+127,7
@@
libutil.a: $(OBJECTS)
# ----------------------
checkconf:
@if [ -f devel ]; then\
# ----------------------
checkconf:
@if [ -f devel ]; then\
+ echo "MAIN.MK checkconf";\
$(MAKE) -f conf.mk srcdir="$(srcdir)" freshconf;\
fi
$(MAKE) -f conf.mk srcdir="$(srcdir)" freshconf;\
fi