diff --git a/INCHI_API/libinchi/gcc/makefile b/INCHI_API/libinchi/gcc/makefile index 53d741d..dcd3d29 100644 --- a/INCHI_API/libinchi/gcc/makefile +++ b/INCHI_API/libinchi/gcc/makefile @@ -182,11 +182,17 @@ sha2.o \ strutil.o \ util.o # === InChI Library link rule ========= +ifdef STATIC +$(INCHI_LIB_PATHNAME).a: $(INCHI_LIB_OBJS) + $(AR) rcs $(INCHI_LIB_PATHNAME).a $(INCHI_LIB_OBJS) + $(RANLIB) $(INCHI_LIB_PATHNAME).a +else $(INCHI_LIB_PATHNAME).so$(VERSION): $(INCHI_LIB_OBJS) $(SHARED_LINK) $(SHARED_LINK_PARM) -o $(INCHI_LIB_PATHNAME).so$(VERSION) \ $(INCHI_LIB_OBJS) -Wl$(LINUX_MAP)$(LINUX_Z_RELRO),-soname,$(INCHI_LIB_NAME).so$(MAIN_VERSION) -lm ln -fs $(INCHI_LIB_NAME).so$(VERSION) \ $(INCHI_LIB_PATHNAME).so$(MAIN_VERSION) +endif # === InChI Library compile rule ========= %.o: $(P_LIBR)%.c $(C_COMPILER) $(C_SO_OPTIONS) $(C_OPTIONS) $< diff --git a/INCHI_EXE/inchi-1/gcc/makefile b/INCHI_EXE/inchi-1/gcc/makefile index 691ce85..3b21aca 100644 --- a/INCHI_EXE/inchi-1/gcc/makefile +++ b/INCHI_EXE/inchi-1/gcc/makefile @@ -36,8 +36,11 @@ ifndef P_BASE endif #P_INCL = -I$(P_MAIN) -I$(P_BASE) P_INCL = -I$(P_MAIN) -I$(P_BASE) +ifndef C_COMPILER_OPTIONS C_COMPILER_OPTIONS = $(P_INCL) -ansi -DCOMPILE_ANSI_ONLY -DTARGET_EXE_STANDALONE -O3 -c #C_COMPILER_OPTIONS = -c $(P_INCL) -ansi -O3 -fsigned-char -ffunction-sections -fexpensive-optimizations -fstack-check -fexceptions -Wall -pedantic -Wbad-function-cast -Wreturn-type -Wformat -Wuninitialized -Wcast-align -Wshadow -Wunused -Wunused-value -Wunused-variable -Wunused-function -Wunused-parameter -Wunused-label -Wcomment -Wcast-qual -Wconversion -Wimplicit-int -Wmissing-braces -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wsign-compare -Wfloat-equal -Wstrict-prototypes -Wwrite-strings -Wundef -Waggregate-return -Wchar-subscripts -Wformat-nonliteral -Wnested-externs -Wsequence-point -Wpointer-arith -mfancy-math-387 -mieee-fp -mno-soft-float +endif +ifndef CPP_COMPILER_OPTIONS ifdef windir # no -ansi option due to reported MinGw bug CPP_COMPILER_OPTIONS = $(P_INCL) -D_LIB -DTARGET_EXE_STANDALONE -O3 -frtti -c @@ -46,6 +49,7 @@ else CPP_COMPILER_OPTIONS = $(P_INCL) -D_LIB -DTARGET_EXE_STANDALONE -ansi -O3 -frtti -c #CPP_COMPILER_OPTIONS = -c $(P_INCL) -D_LIB -ansi -O3 -frtti -Wall -pedantic -Wreturn-type -Wformat -Wuninitialized -ffunction-sections -fexpensive-optimizations -fstack-check -fexceptions -Wcast-align -Wshadow -Wunused -Wunused-value -Wunused-variable -Wunused-function -fsigned-char -Wcast-qual -Wconversion -Wmissing-braces -Wredundant-decls -Wsign-compare -Wfloat-equal -Wwrite-strings -mfancy-math-387 -mieee-fp -mno-soft-float endif +endif #LINKER_OPTIONS = -static-libgcc #LINKER_OPTIONS = -Wall -Wunused -Wunused-function INCHI_SRCS = $(P_LIBR)/ichi_bns.c \