SDCFLAGS = --debug --stack-after-data --model-small
SDCPPFLAGS =
-LIBS = @LIBS@ -L$(PRJDIR) -lsim -lutil -lsim -lcmd -lguiucsim
+LIBS = @LIBS@ -L$(PRJDIR) -Wl,--start-group -lutil -lsim -lcmd -lguiucsim -Wl,--end-group
DL = @DL@
dl_ok = @dl_ok@
infodir = @infodir@
srcdir = @srcdir@
-EXEEXT = @EXEEXT@
+EXEEXT = @EXEEXT@
OBJECTS_SHARED = glob.o sim51.o \
inc.o jmp.o mov.o logic.o arith.o bit.o \
# Compiling and installing everything and runing test
# ---------------------------------------------------
install: all installdirs
- $(INSTALL) -s s51$(EXEEXT) $(bindir)
+ $(INSTALL) -s s51$(EXEEXT) $(DESTDIR)$(bindir)
# Deleting all the installed files
# --------------------------------
uninstall:
- rm -f $(bindir)/s51$(EXEEXT)
+ rm -f $(DESTDIR)$(bindir)/s51$(EXEEXT)
# Performing self-test
# Creating installation directories
# ---------------------------------
installdirs:
- test -d $(bindir) || $(INSTALL) -d $(bindir)
+ test -d $(DESTDIR)$(bindir) || $(INSTALL) -d $(DESTDIR)$(bindir)
# Creating dependencies
$(CXX) -shared $(OBJECTS_SHARED) -o $@
otherlibs:
+ cd $(PRJDIR) && $(MAKE) libs
cd $(PRJDIR)/cmd.src && $(MAKE) all
cd $(PRJDIR)/sim.src && $(MAKE) all
$(MAKE) -C $(PRJDIR)/gui.src checkconf ucsim_lib