Unverified Commit d6284687 authored by Julian Kranz's avatar Julian Kranz
Browse files

Revert "added Makefile rules to compile dynamic libraries for cppgdsl and gdsl-multiplex."

This reverts commit 83e500a9.
parent f5a5c4e8
......@@ -119,7 +119,6 @@ tools/x86-test-stats-runner/src/x86_test_stats_runner-main.o
/gdslc
/libgdsl.so
/libs/gdsl-multiplex/libgdsl-multiplex.a
/libs/gdsl-multiplex/libgdsl-multiplex.so
/libs/gdwrap/libgdwrap.a
/libs/readhex/libreadhex.a
/libs/rreil-sim/librreil-sim.a
......
../libs/cppgdsl/libcppgdsl.so
\ No newline at end of file
../libs/gdsl-multiplex/libgdsl-multiplex.so
\ No newline at end of file
/libcppgdsl.a
/libcppgdsl.so
/build/*
......@@ -5,10 +5,8 @@ CPP=clang++
INCDS=-Iinclude -I$(GDSL)/include
CFLAGS=-c -MMD -ggdb3 -std=gnu99 -Wall -Wfatal-errors -DRELAXEDFATAL $(INCDS)
CPPFLAGS=-c -MMD -ggdb3 -std=c++11 -Wall -Wno-overloaded-virtual -Wno-deprecated $(INCDS)
LDFLAGS= -L$(GDSL)/lib -lgdsl-multiplex
LIBRARY_STATIC=libcppgdsl.a
LIBRARY_SHARED=libcppgdsl.so
LIBRARY=libcppgdsl.a
SPRE=src
HPRE=include
......@@ -17,7 +15,7 @@ BPRE=build
CSOURCES=$(shell find $(SPRE)/ -type f -name '*.c')
CPPSOURCES=$(shell find $(SPRE)/ -type f -name '*.cpp')
all: pre-build $(LIBRARY_STATIC) $(LIBRARY_SHARED)
all: pre-build $(LIBRARY)
SDIRS=$(shell find $(SPRE)/ -type d)
BDIRS=$(SDIRS:$(SPRE)/%=$(BPRE)/%)
......@@ -29,7 +27,7 @@ COBJECTS=$(CSOURCES:$(SPRE)/%.c=$(BPRE)/%.o)
CPPOBJECTS=$(CPPSOURCES:$(SPRE)/%.cpp=$(BPRE)/%.o)
OBJECTS=$(COBJECTS) $(CPPOBJECTS)
$(LIBRARY_STATIC): $(OBJECTS)
$(LIBRARY): $(OBJECTS)
ar rvs $@ $(OBJECTS)
-include ${COBJECTS:.o=.d}
......@@ -40,18 +38,5 @@ $(COBJECTS): $(BPRE)/%.o : $(SPRE)/%.c
$(CPPOBJECTS): $(BPRE)/%.o : $(SPRE)/%.cpp
$(CPP) $(CPPFLAGS) $< -o $@
C_PIC_OBJECTS=$(CSOURCES:$(SPRE)/%.c=$(BPRE)/%_pic.o)
CPP_PIC_OBJECTS=$(CPPSOURCES:$(SPRE)/%.cpp=$(BPRE)/%_pic.o)
PIC_OBJECTS=$(C_PIC_OBJECTS) $(CPP_PIC_OBJECTS)
$(LIBRARY_SHARED): $(PIC_OBJECTS)
$(CPP) -shared -o $@ $(PIC_OBJECTS) $(LDFLAGS)
$(C_PIC_OBJECTS): $(BPRE)/%_pic.o : $(SPRE)/%.c
$(CC) $(CFLAGS) -fPIC $< -o $@
$(CPP_PIC_OBJECTS): $(BPRE)/%_pic.o : $(SPRE)/%.cpp
$(CPP) $(CPPFLAGS) -fPIC $< -o $@
clean:
rm -rf $(BDIRS) $(LIBRARY_STATIC) $(LIBRARY_SHARED)
rm -rf $(BDIRS) $(LIBRARY)
......@@ -4,11 +4,10 @@ CC=gcc
INCDS=-Iinclude -I$(MLTK)/include
CFLAGS=-c -fPIC -g3 -std=gnu99 -Wall -Wfatal-errors -DRELAXEDFATAL $(INCDS)
LIBRARY_STATIC=libgdsl-multiplex.a
LIBRARY_SHARED=libgdsl-multiplex.so
LIBRARY=libgdsl-multiplex.a
SOURCES=gdsl_multiplex.c
all: pre-build $(LIBRARY_STATIC) $(LIBRARY_SHARED)
all: pre-build $(LIBRARY)
SPRE=src
BPRE=build
......@@ -19,14 +18,11 @@ pre-build:
OBJECTS=$(addprefix $(BPRE)/, $(SOURCES:.c=.o))
$(LIBRARY_STATIC): $(OBJECTS)
$(LIBRARY): $(OBJECTS)
ar -r $@ $(OBJECTS)
$(OBJECTS): $(BPRE)/%.o : $(SPRE)/%.c
$(CC) $(CFLAGS) $< -o $@
$(LIBRARY_SHARED): $(OBJECTS)
$(CC) -shared -o $@ $(OBJECTS)
clean:
rm -rf $(BDIRS) $(LIBRARY_STATIC) $(LIBRARY_SHARED)
rm -rf $(BDIRS) $(LIBRARY)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment