4 # (c) Drotos Daniel, Talker Bt. 1997,99
19 DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
20 # FIXME: -Imcs51 must be removed!!!
21 CPPFLAGS = @CPPFLAGS@ -I$(PRJDIR) -I$(PRJDIR)/$(SIMDIR)
22 CFLAGS = @CFLAGS@ -I$(PRJDIR) -Wall
23 CXXFLAGS = @CXXFLAGS@ -I$(PRJDIR) -Wall
26 LIB_LIST = sim cmd sim util
27 UCSIM_LIBS = $(patsubst %,-l%,$(LIB_LIST))
28 UCSIM_LIB_FILES = $(patsubst %,lib%.a,$(LIB_LIST))
31 exec_prefix = @exec_prefix@
35 includedir = @includedir@
37 man1dir = $(mandir)/man1
38 man2dir = $(mandir)/man2
42 OBJECTS = pobj.o globals.o utils.o
43 SOURCES = $(patsubst %.o,%.cc,$(OBJECTS))
44 UCSIM_OBJECTS = ucsim.o
45 UCSIM_SOURCES = $(patsubst %.o,%.cc,$(UCSIM_OBJECTS))
46 ALL_SOURCES = $(SOURCES) $(UCSIM_SOURCES)
49 # Compiling entire program or any subproject
50 # ------------------------------------------
55 main_app: checkconf ucsim_app
57 # Compiling and installing everything and runing test
58 # ---------------------------------------------------
59 install: all installdirs
62 # Deleting all the installed files
63 # --------------------------------
67 rm -f $(bindir)/serialview
68 rm -f $(bindir)/portmon
71 # Performing self-test
72 # --------------------
76 # Performing installation test
77 # ----------------------------
81 # Creating installation directories
82 # ---------------------------------
86 # Creating dependencies
87 # ---------------------
90 main.dep: $(ALL_SOURCES) *.h
91 $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(ALL_SOURCES) >main.dep
102 libutil.a: $(OBJECTS)
103 ar -rcu $*.a $(OBJECTS)
106 ucsim_app: libs ucsim
108 ucsim: $(UCSIM_OBJECTS) $(UCSIM_LIB_FILES)
109 echo $(UCSIM_LIB_FILES)
110 $(CXX) $(CXXFLAGS) -o $@ $< -L$(PRJDIR) $(UCSIM_LIBS)
113 $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
126 # Remaking configuration
127 # ----------------------
129 @if [ -f devel ]; then\
130 echo "MAIN.MK checkconf";\
131 $(MAKE) -f conf.mk srcdir="$(srcdir)" freshconf;\
134 # End of main_in.mk/main.mk