Page MenuHomec4science

Makefile.mingw64-cross
No OneTemporary

File Metadata

Created
Fri, Dec 27, 14:27

Makefile.mingw64-cross

# library build -*- makefile -*- for qmmm module
# which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.empty
# ------ SETTINGS ------
CC = x86_64-w64-mingw32-gcc
CFLAGS = -O2 -march=core2 -mtune=core2 -mpc64 -msse2 \
-ffast-math -funroll-loops -fstrict-aliasing \
-Wall -W -Wno-uninitialized
ARCHIVE = x86_64-w64-mingw32-ar
ARCHFLAG = -rscv
SHELL = /bin/sh
# ------ DEFINITIONS ------
DIR = Obj_mingw64/
SRC = libqmmm.c
LIB = $(DIR)libqmmm.a
OBJ = $(SRC:%.c=$(DIR)%.o)
# ------ MAKE PROCEDURE ------
default: $(DIR) $(LIB) $(EXE) Makefile.lammps
$(DIR):
mkdir $(DIR)
Makefile.lammps:
@cp $(EXTRAMAKE) Makefile.lammps
$(LIB): $(DIR) $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ MAKE FLAGS ------
.SUFFIXES:
.SUFFIXES: .c .o
.PHONY: default clean
# ------ COMPILE RULES ------
$(DIR)%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
# ------ DEPENDENCIES ------
#
$(DIR)libqmmm.o: libqmmm.c libqmmm.h
# ------ CLEAN ------
clean:
-rm $(DIR)*.o *~ $(LIB)
-rmdir $(DIR)

Event Timeline