4 # (c) Drotos Daniel, Talker Bt. 1997,99
21 DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@)
22 # FIXME: -Imcs51 must be removed!!!
23 CPPFLAGS = @CPPFLAGS@ -I$(PRJDIR) -I$(PRJDIR)/$(SIMDIR) \
24 -I$(CMDDIR) -I$(GUIDIR)
25 CFLAGS = @CFLAGS@ -I$(PRJDIR) -Wall
26 CXXFLAGS = @CXXFLAGS@ -I$(PRJDIR) -Wall
29 LIB_LIST = sim cmd sim util
30 UCSIM_LIBS = $(patsubst %,-l%,$(LIB_LIST))
31 UCSIM_LIB_FILES = $(patsubst %,lib%.a,$(LIB_LIST))
34 exec_prefix = @exec_prefix@
38 includedir = @includedir@
40 man1dir = $(mandir)/man1
41 man2dir = $(mandir)/man2
45 OBJECTS = pobj.o globals.o utils.o error.o
46 SOURCES = $(patsubst %.o,%.cc,$(OBJECTS))
47 UCSIM_OBJECTS = ucsim.o
48 UCSIM_SOURCES = $(patsubst %.o,%.cc,$(UCSIM_OBJECTS))
49 ALL_SOURCES = $(SOURCES) $(UCSIM_SOURCES)
51 enable_ucsim = @enable_ucsim@
54 # Compiling entire program or any subproject
55 # ------------------------------------------
60 main_app: checkconf ucsim_app
62 # Compiling and installing everything and runing test
63 # ---------------------------------------------------
64 install: all installdirs
67 # Deleting all the installed files
68 # --------------------------------
72 rm -f $(bindir)/serialview
73 rm -f $(bindir)/portmon
76 # Performing self-test
77 # --------------------
82 # Performing installation test
83 # ----------------------------
87 # Creating installation directories
88 # ---------------------------------
92 # Creating dependencies
93 # ---------------------
96 main.dep: $(ALL_SOURCES) *.h
97 $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(ALL_SOURCES) >main.dep
108 libutil.a: $(OBJECTS)
109 ar -rcu $*.a $(OBJECTS)
113 ifeq ($(enable_ucsim),yes)
114 ucsim_app: libs ucsim
119 ucsim: $(UCSIM_OBJECTS) $(UCSIM_LIB_FILES)
120 echo $(UCSIM_LIB_FILES)
121 $(CXX) $(CXXFLAGS) -o $@ $< -L$(PRJDIR) $(UCSIM_LIBS)
124 $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
137 # Remaking configuration
138 # ----------------------
140 @if [ -f devel ]; then\
141 echo "MAIN.MK checkconf";\
142 $(MAKE) -f conf.mk srcdir="$(srcdir)" freshconf;\
145 # End of main_in.mk/main.mk