summaryrefslogtreecommitdiffstats
path: root/utils/regtools/lib/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'utils/regtools/lib/Makefile')
-rw-r--r--utils/regtools/lib/Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/utils/regtools/lib/Makefile b/utils/regtools/lib/Makefile
new file mode 100644
index 0000000000..ef8d4c0533
--- /dev/null
+++ b/utils/regtools/lib/Makefile
@@ -0,0 +1,23 @@
+CC=gcc
+CXX=g++
+AR=ar
+CFLAGS=-Wall -O2 `xml2-config --cflags` -std=c99 -g -fPIC
+CXXFLAGS=-Wall -O2 `xml2-config --cflags` -g -fPIC
+LIB=libsocdesc.a
+SRC=$(wildcard *.c)
+SRCXX=$(wildcard *.cpp)
+OBJ=$(SRC:.c=.o) $(SRCXX:.cpp=.o)
+
+all: $(LIB) $(EXEC)
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+
+%.o: %.cpp
+ $(CXX) $(CXXFLAGS) -c -o $@ $<
+
+$(LIB): $(OBJ)
+ $(AR) rcs $@ $^
+
+clean:
+ rm -rf $(OBJ) $(LIB) \ No newline at end of file