# # S51 main.mk # # (c) Drotos Daniel, Talker Bt. 1997,99 # STARTYEAR = 1997 SHELL = /bin/sh CXX = @CXX@ #CPP = @CPP@ CXXCPP = @CXXCPP@ RANLIB = @RANLIB@ INSTALL = @INSTALL@ PRJDIR = . DEFS = $(subs -DHAVE_CONFIG_H,,@DEFS@) # FIXME: -Imcs51 must be removed!!! CPPFLAGS = @CPPFLAGS@ -I$(PRJDIR) CFLAGS = @CFLAGS@ -I$(PRJDIR) -Wall CXXFLAGS = @CXXFLAGS@ -I$(PRJDIR) -Wall M_OR_MM = @M_OR_MM@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = @libdir@ datadir = @datadir@ includedir = @includedir@ mandir = @mandir@ man1dir = $(mandir)/man1 man2dir = $(mandir)/man2 infodir = @infodir@ srcdir = @srcdir@ OBJECTS = pobj.o globals.o utils.o # Compiling entire program or any subproject # ------------------------------------------ all: checkconf libs libs: libutil.a # Compiling and installing everything and runing test # --------------------------------------------------- install: all installdirs # Deleting all the installed files # -------------------------------- uninstall: rm -f $(bindir)/s51 rm -f $(bindir)/savr rm -f $(bindir)/serialview rm -f $(bindir)/portmon # Performing self-test # -------------------- check: # Performing installation test # ---------------------------- installcheck: # Creating installation directories # --------------------------------- installdirs: # Creating dependencies # --------------------- dep: main.dep main.dep: *.cc *.h $(CXXCPP) $(CPPFLAGS) $(M_OR_MM) *.cc >main.dep include main.dep include clean.mk #parser.cc: parser.y #plex.cc: plex.l # My rules # -------- libutil.a: $(OBJECTS) ar -rcu $*.a $(OBJECTS) $(RANLIB) $*.a .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\ $(MAKE) -f conf.mk srcdir="$(srcdir)" freshconf;\ fi # End of main_in.mk/main.mk