projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
[fw/sdcc]
/
sim
/
ucsim
/
main_in.mk
diff --git
a/sim/ucsim/main_in.mk
b/sim/ucsim/main_in.mk
index b9e4c989a670fd9f2d4d20fa239516f9319051a0..ea45c8eda03317cc070a31aeca20edd958b7d118 100644
(file)
--- a/
sim/ucsim/main_in.mk
+++ b/
sim/ucsim/main_in.mk
@@
-13,42
+13,55
@@
CXXCPP = @CXXCPP@
RANLIB = @RANLIB@
INSTALL = @INSTALL@
RANLIB = @RANLIB@
INSTALL = @INSTALL@
-PRJDIR = .
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
SIMDIR = sim.src
SIMDIR = sim.src
+CMDDIR = cmd.src
+GUIDIR = gui.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) -I$(PRJDIR)/$(SIMDIR)
-CFLAGS = @CFLAGS@ -I$(PRJDIR) -Wall
-CXXFLAGS = @CXXFLAGS@ -I$(PRJDIR) -Wall
+CPPFLAGS = @CPPFLAGS@ -I$(top_builddir) -I$(srcdir) \
+ -I$(top_srcdir)/$(SIMDIR) \
+ -I$(top_srcdir)/$(CMDDIR) -I$(top_srcdir)/$(GUIDIR)
+CFLAGS = @CFLAGS@ -I$(top_builddir) -Wall
+CXXFLAGS = @CXXFLAGS@ -I$(top_builddir) -Wall
M_OR_MM = @M_OR_MM@
M_OR_MM = @M_OR_MM@
-UCSIM_LIBS = -lsim -lcmd -lutil
+EXEEXT = @EXEEXT@
+
+LIB_LIST = ucsimutil cmd sim
+UCSIM_LIBS = -Wl,--start-group $(patsubst %,-l%,$(LIB_LIST)) -Wl,--end-group
+UCSIM_LIB_FILES = $(patsubst %,lib%.a,$(LIB_LIST))
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
datadir = @datadir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
datadir = @datadir@
+datarootdir = @datarootdir@
includedir = @includedir@
mandir = @mandir@
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
infodir = @infodir@
srcdir = @srcdir@
includedir = @includedir@
mandir = @mandir@
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
infodir = @infodir@
srcdir = @srcdir@
+VPATH = @srcdir@
-OBJECTS = pobj.o globals.o utils.o
+OBJECTS = pobj.o globals.o utils.o
error.o app.o option.o
SOURCES = $(patsubst %.o,%.cc,$(OBJECTS))
UCSIM_OBJECTS = ucsim.o
UCSIM_SOURCES = $(patsubst %.o,%.cc,$(UCSIM_OBJECTS))
ALL_SOURCES = $(SOURCES) $(UCSIM_SOURCES)
SOURCES = $(patsubst %.o,%.cc,$(OBJECTS))
UCSIM_OBJECTS = ucsim.o
UCSIM_SOURCES = $(patsubst %.o,%.cc,$(UCSIM_OBJECTS))
ALL_SOURCES = $(SOURCES) $(UCSIM_SOURCES)
+enable_ucsim = @enable_ucsim@
+
# Compiling entire program or any subproject
# ------------------------------------------
all: checkconf libs
# Compiling entire program or any subproject
# ------------------------------------------
all: checkconf libs
-libs: libutil.a
+libs: libu
csimu
til.a
main_app: checkconf ucsim_app
main_app: checkconf ucsim_app
@@
-60,16
+73,17
@@
install: all installdirs
# Deleting all the installed files
# --------------------------------
uninstall:
# Deleting all the installed files
# --------------------------------
uninstall:
- rm -f $(
bindir)/s51
- rm -f $(
bindir)/savr
- rm -f $(
bindir)/serialview
- rm -f $(
bindir)/portmon
+ rm -f $(
DESTDIR)$(bindir)/s51$(EXEEXT)
+ rm -f $(
DESTDIR)$(bindir)/savr$(EXEEXT)
+ rm -f $(
DESTDIR)$(bindir)/serialview$(EXEEXT)
+ rm -f $(
DESTDIR)$(bindir)/portmon$(EXEEXT)
# Performing self-test
# --------------------
check:
# Performing self-test
# --------------------
check:
+test:
# Performing installation test
# ----------------------------
# Performing installation test
# ----------------------------
@@
-85,11
+99,11
@@
installdirs:
# ---------------------
dep: main.dep
# ---------------------
dep: main.dep
-main.dep: $(ALL_SOURCES) *.h
- $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(
ALL_SOURCES
) >main.dep
+main.dep: $(ALL_SOURCES) *.h
$(srcdir)/*.h
+ $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(
filter %.cc,$^
) >main.dep
-include main.dep
-include clean.mk
+
-
include main.dep
+include
$(srcdir)/
clean.mk
#parser.cc: parser.y
#parser.cc: parser.y
@@
-97,34
+111,32
@@
include clean.mk
# My rules
# --------
# My rules
# --------
-libutil.a: $(OBJECTS)
+libu
csimu
til.a: $(OBJECTS)
ar -rcu $*.a $(OBJECTS)
$(RANLIB) $*.a
ar -rcu $*.a $(OBJECTS)
$(RANLIB) $*.a
+
+ifeq ($(enable_ucsim),yes)
ucsim_app: libs ucsim
ucsim_app: libs ucsim
+else
+ucsim_app:
+endif
-ucsim: $(UCSIM_OBJECTS) $()
- $(CXX) $(CXXFLAGS) -o $@ $< -L$(PRJDIR) $(UCSIM_LIBS)
+ucsim: $(UCSIM_OBJECTS) $(UCSIM_LIB_FILES)
+ echo $(UCSIM_LIB_FILES)
+ $(CXX) $(CXXFLAGS) -o $@ $< -L$(top_builddir) $(UCSIM_LIBS)
+ptt: ptt.o
+ $(CXX) $(CXXFLAGS) -o $@ $< -lpthread
.cc.o:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
.cc.o:
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
-.y.cc:
- rm -f $*.cc $*.h
- $(YACC) -d $<
- mv y.tab.c $*.cc
- mv y.tab.h $*.h
-
-.l.cc:
- rm -f $*.cc
- $(LEX) -t $< >$*.cc
-
# Remaking configuration
# ----------------------
checkconf:
@if [ -f devel ]; then\
# Remaking configuration
# ----------------------
checkconf:
@if [ -f devel ]; then\
-
echo
"MAIN.MK checkconf";\
+
$(top_srcdir)/mkecho $(top_builddir)
"MAIN.MK checkconf";\
$(MAKE) -f conf.mk srcdir="$(srcdir)" freshconf;\
fi
$(MAKE) -f conf.mk srcdir="$(srcdir)" freshconf;\
fi