diff options
author | Your Name <you@example.com> | 2023-05-30 18:33:10 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2023-05-30 18:33:10 -0400 |
commit | e1ef3e987a1ef87fad2e44d2023e4aa50fb28c35 (patch) | |
tree | b48a6087720d6bf69a80f0c284320320043fcdee /configure | |
parent | d428ae1c5b3b0ec88c1b55c56317c3750502d5f4 (diff) | |
download | dmtool-e1ef3e987a1ef87fad2e44d2023e4aa50fb28c35.tar.gz dmtool-e1ef3e987a1ef87fad2e44d2023e4aa50fb28c35.tar.bz2 dmtool-e1ef3e987a1ef87fad2e44d2023e4aa50fb28c35.zip |
Changed makefiles, added parsed files
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/configure b/configure deleted file mode 100755 index 61c60b2..0000000 --- a/configure +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/bash - -# These are the project-specific variables - -EXECUTABLE="dmtool" - -# e.g., foo.so -LIBRARY= - -TEST= - -# List of libs as given to pkg-config -LIBS="libconfuse nlohmann_json" - -CXXFLAGS="-Wall -fPIC -std=c++20" - -LDFLAGS= - -SOURCE_DIR="src" - -EXTRAS=" -parsed: parser/scrapeToJson.py parser/utils.py parser/verified.txt - python parser/scrapeToJson.py - touch parsed/ -" - -INSTALL=' -install: $(EXECUTABLE) parsed - install -d $(DESTDIR)$(PREFIX)/share/dmtool/ - cp -r parsed/* $(DESTDIR)$(PREFIX)/share/dmtool/ - install -d $(DESTDIR)$(PREFIX)/bin/ - install -m 755 $(EXECUTABLE) $(DESTDIR)$(PREFIX)/bin/ - install -m 644 files/dmtool.bash $(DESTDIR)`pkg-config --variable=completionsdir bash-completion`/dmtool - install -m 644 files/dmtool.conf $(DESTDIR)/etc/dmtool.conf -' - -# Below here shouldn't need editing - -SOURCES=`find $SOURCE_DIR | grep .cc$ | tr '\n' ' '` - -PKG_CONFIG_CFLAGS= -PKG_CONFIG_LIBS= -if [ -n "$LIBS" ]; then - PKG_CONFIG_CFLAGS='`pkg-config $(LIBS) --cflags`' - PKG_CONFIG_LIBS='`pkg-config $(LIBS) --libs`' -fi - -ALL="all: \$(SOURCES)" - -LIBRULE= -if [ -n "$LIBRARY" ]; then - LIBRULE=" -\$(LIBRARY): \$(OBJECTS) - \$(CXX) \$(OBJECTS) -shared -o \$@ \$(LDFLAGS) \$(LDLIBS) -" - ALL="$ALL \$(LIBRARY)" -fi - -EXERULE= -if [ -n "$EXECUTABLE" ]; then - EXERULE=" -\$(EXECUTABLE): \$(OBJECTS) - \$(CXX) \$(OBJECTS) -o \$@ \$(LDFLAGS) \$(LDLIBS) -" - ALL="$ALL \$(EXECUTABLE)" -fi - -TESTRULE= -if [ -n "$TEST" ]; then - TESTRULE=" -\$(TEST): \$(OBJECTS) - \$(CXX) \$(OBJECTS) -o \$@ \$(LDFLAGS) \$(LDLIBS) -lcppunit - -test: \$(TEST) - ./\$(TEST) -" - ALL="$ALL \$(TEST)" -fi - - -ORULES=$(for cc in `find $SOURCE_DIR | grep .cc$`; do g++ -MM -MT `cut -d'.' -f-1 <<< $cc`.o $cc; done) - -cat << EOF > Makefile -LIBS=$LIBS -override CXXFLAGS += $CXXFLAGS $PKG_CONFIG_CFLAGS -override LDFLAGS += $LDFLAGS $PKG_CONFIG_LIBS -CC=\$(CXX) -SOURCES=$SOURCES -OBJECTS=\$(SOURCES:.cc=.o) -LIBRARY=$LIBRARY -EXECUTABLE=$EXECUTABLE -PREFIX := /usr - -$ALL -$EXTRAS$INSTALL$LIBRULE$EXERULE$TESTRULE - -$ORULES - -clean: - \$(RM) \$(LIBRARY) \$(EXECUTABLE) \$(TEST) \$(OBJECTS) -EOF |