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 UCSIM_LIBS = -lsim -lcmd -lutil
29 exec_prefix = @exec_prefix@
33 includedir = @includedir@
35 man1dir = $(mandir)/man1
36 man2dir = $(mandir)/man2
40 OBJECTS = pobj.o globals.o utils.o
41 SOURCES = $(patsubst %.o,%.cc,$(OBJECTS))
42 UCSIM_OBJECTS = ucsim.o
43 UCSIM_SOURCES = $(patsubst %.o,%.cc,$(UCSIM_OBJECTS))
44 ALL_SOURCES = $(SOURCES) $(UCSIM_SOURCES)
47 # Compiling entire program or any subproject
48 # ------------------------------------------
53 main_app: checkconf ucsim_app
55 # Compiling and installing everything and runing test
56 # ---------------------------------------------------
57 install: all installdirs
60 # Deleting all the installed files
61 # --------------------------------
65 rm -f $(bindir)/serialview
66 rm -f $(bindir)/portmon
69 # Performing self-test
70 # --------------------
74 # Performing installation test
75 # ----------------------------
79 # Creating installation directories
80 # ---------------------------------
84 # Creating dependencies
85 # ---------------------
88 main.dep: $(ALL_SOURCES) *.h
89 $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) $(ALL_SOURCES) >main.dep
100 libutil.a: $(OBJECTS)
101 ar -rcu $*.a $(OBJECTS)
104 ucsim_app: libs ucsim
106 ucsim: $(UCSIM_OBJECTS) $()
107 $(CXX) $(CXXFLAGS) -o $@ $< -L$(PRJDIR) $(UCSIM_LIBS)
110 $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $< -o $@
123 # Remaking configuration
124 # ----------------------
126 @if [ -f devel ]; then\
127 echo "MAIN.MK checkconf";\
128 $(MAKE) -f conf.mk srcdir="$(srcdir)" freshconf;\
131 # End of main_in.mk/main.mk