Makefile
changeset 36 60b6076ae5c2
parent 34 86c247b7be8d
child 43 8a68085acebf
equal deleted inserted replaced
35:1fba29d8a172 36:60b6076ae5c2
   113 #-----------------------------------------------------------------------------#
   113 #-----------------------------------------------------------------------------#
   114 
   114 
   115 BINDIR := bin
   115 BINDIR := bin
   116 SRCDIR := .
   116 SRCDIR := .
   117 
   117 
   118 CFLAGS += $(use_asm) -I$(SRCDIR) -D_REENTRANT -fsigned-char -DPLATFORM_UNIX
   118 CFLAGS += $(use_asm) -I$(SRCDIR) -I/usr/include/readline -D_REENTRANT -fsigned-char -DPLATFORM_UNIX
   119 CFLAGS += -Wall -Werror -fno-exceptions -fno-rtti -ansi -pedantic
   119 CFLAGS += -Wall -Werror -fno-exceptions -fno-rtti -ansi -pedantic
   120 
   120 
   121 LDFLAGS += -lm
   121 LDFLAGS += -lm
   122 
   122 
   123 ifeq ($(strip $(debugging)),true)
   123 ifeq ($(strip $(debugging)),true)
   128   LDFLAGS += -O2 -fomit-frame-pointer
   128   LDFLAGS += -O2 -fomit-frame-pointer
   129 endif
   129 endif
   130 
   130 
   131 ASMFLAGS := -f $(ASMOBJFMT) $(ASMDEFS)
   131 ASMFLAGS := -f $(ASMOBJFMT) $(ASMDEFS)
   132 
   132 
       
   133 TESTLDFLAGS := -lreadline
   133 
   134 
   134 #-----------------------------------------------------------------------------#
   135 #-----------------------------------------------------------------------------#
   135 # Source and target names.
   136 # Source and target names.
   136 #-----------------------------------------------------------------------------#
   137 #-----------------------------------------------------------------------------#
   137 
   138 
   193 
   194 
   194 $(MAINLIB) : $(BINDIR) $(MAINOBJS)
   195 $(MAINLIB) : $(BINDIR) $(MAINOBJS)
   195 	$(LINKER) -o $(MAINLIB) $(LDFLAGS) $(SHAREDFLAGS) $(MAINOBJS)
   196 	$(LINKER) -o $(MAINLIB) $(LDFLAGS) $(SHAREDFLAGS) $(MAINOBJS)
   196 
   197 
   197 $(TESTEXE) : $(MAINLIB) $(TESTOBJS)
   198 $(TESTEXE) : $(MAINLIB) $(TESTOBJS)
   198 	$(LINKER) -o $(TESTEXE) $(LDFLAGS) $(TESTOBJS) $(MAINLIB)
   199 	$(LINKER) -o $(TESTEXE) $(LDFLAGS) $(TESTLDFLAGS) $(TESTOBJS) $(MAINLIB)
   199 
   200 
   200 
   201 
   201 $(BINDIR):
   202 $(BINDIR):
   202 	mkdir -p $(BINDIR)
   203 	mkdir -p $(BINDIR)
   203 	mkdir -p $(BINDIR)/archivers
   204 	mkdir -p $(BINDIR)/archivers