Plaster

shell
# SOIL makefile for linux (based on the AngelScript makefile) # Type 'make' then 'make install' to complete the installation of the library # For 'make install' to work, set LOCAL according to your system configuration LOCAL = /home/$(shell whoami)/.local LIB = libSOIL.a SLIB = libSOIL.dll INC = SOIL.h SRCDIR = ../../src LIBDIR = ../../lib INCDIR = ../../src OBJDIR = obj CXX = gcc CXXFLAGS = -O2 -s -Wall DELETER = rm -f COPIER = cp SRCNAMES = \ image_helper.c \ stb_image_aug.c \ image_DXT.c \ SOIL.c \ OBJ = $(addprefix $(OBJDIR)/, $(notdir $(SRCNAMES:.c=.o))) BIN = $(LIBDIR)/$(LIB) # !!!! FIX THESE PATHS FOR YOURSELF !!!! LIBDIRS = -LC:/msys64/mingw64/lib -LC:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/7.1.0 -LC:/msys64/mingw64/x86_64-w64-mingw32/lib -L$(LIBDIR) LIBS = -lopengl32 -lSOIL all: $(BIN) $(BIN): $(OBJ) ar r $(BIN) $(OBJ) ranlib $(BIN) $(CXX) $(CXXFLAGS) -o $(LIBDIR)/$(SLIB) -shared $^ $(LIBDIRS) $(LIBS) @echo ------------------------------------------------------------------- @echo Done. As root, type 'make install' to install the library. $(OBJDIR)/%.o: $(SRCDIR)/%.c $(CXX) $(CXXFLAGS) -o $@ -c $< clean: $(DELETER) $(OBJ) $(BIN) install: $(BIN) @echo Installing to: $(LOCAL)/lib and $(LOCAL)/include... @echo ------------------------------------------------------------------- $(COPIER) $(BIN) $(LOCAL)/lib $(COPIER) $(INCDIR)/$(INC) $(LOCAL)/include @echo ------------------------------------------------------------------- @echo SOIL library installed. Enjoy! uninstall: $(DELETER) $(LOCAL)/include/$(INC) $(LOCAL)/lib/$(LIB) @echo ------------------------------------------------------------------- @echo SOIL library uninstalled. .PHONY: all clean install uninstall