Building null and opengl specific libraries now.

This commit is contained in:
Angelo Papenhoff
2014-12-24 14:04:46 +01:00
parent 521656dc1e
commit 716a70afae
2 changed files with 25 additions and 5 deletions

View File

@ -1,13 +1,19 @@
# null, opengl
BUILD=null
# e.g. null -> -DRW_NULL
BUILDDEF:=$(shell echo $(BUILD) | tr a-z A-Z | sed 's/^/-DRW_/')
BUILDDIR=build-$(BUILD)
SRCDIR=src
BUILDDIR=build
SRC := $(patsubst %.cpp,$(SRCDIR)/%.cpp, rwbase.cpp clump.cpp\
geometry.cpp plugins.cpp ps2.cpp\
ogl.cpp)
OBJ := $(patsubst $(SRCDIR)/%.cpp,$(BUILDDIR)/%.o,$(SRC))
DEP := $(patsubst $(SRCDIR)/%.cpp,$(BUILDDIR)/%.d,$(SRC))
CFLAGS=-Wall -Wextra -g #-Wno-parentheses #-Wconversion
CFLAGS=-Wall -Wextra -g $(BUILDDEF) #-Wno-parentheses #-Wconversion
LIB=librw-$(BUILD).a
librw.a: $(OBJ)
$(LIB): $(OBJ)
ar scr $@ $(OBJ)
$(BUILDDIR)/%.o: $(SRCDIR)/%.cpp
@ -16,4 +22,7 @@ $(BUILDDIR)/%.o: $(SRCDIR)/%.cpp
$(BUILDDIR)/%.d: $(SRCDIR)/%.cpp
$(CXX) -MM -MT '$(patsubst $(SRCDIR)/%.cpp,$(BUILDDIR)/%.o,$<)' $(CFLAGS) $< > $@
clean:
rm -f $(BUILDDIR)/*.[od]
-include $(DEP)