Signed-off-by: Keith Packard <keithp@keithp.com>
SUBDIRS=src src/sim src/intel src/x11
all::
- cd backend && make all
+ +cd backend && make all
clean::
- cd backend && make clean
+ +cd backend && make clean
include $(TOP)/Makefile.shared
OBJ=$(C_SRC:.c=.o) $(CPP_SRC:.cpp=.o)
-VERSION=0.0.1
-LIB=$(TOP)/libgbe.so.$(VERSION)
+LIBBASE=libgbe.so
+MAJOR=0
+MINOR=0
+REVISION=1
+
+VERSION=$(MAJOR).$(MINOR).$(REVISION)
+LIBMAJOR=$(LIBBASE).$(MAJOR)
+LIB=$(LIBMAJOR).$(MINOR).$(REVISION)
LIBS=-Wl,--no-undefined $(shell llvm-config-3.0 --libs) -ldl -lpthread
VERSION=0.0.1
-LIB=libgbe.so.$(VERSION)
+
+all: $(LIB) $(LIBMAJOR) $(LIBBASE)
$(LIB): $(OBJ)
$(CXX) $(CXXFLAGS) -shared -o $@ $(OBJ) $(LIBS)
+$(LIBMAJOR): $(LIB)
+ rm -f $@
+ ln -s $(LIB) $@
+
+$(LIBBASE): $(LIBMAJOR)
+ rm -f $@
+ ln -s $(LIBMAJOR) $@
+
clean:
- rm -f $(LIB)
+ rm -f $(LIB) $(LIBMAJOR) $(LIBBASE)