pmachapman / helpdeco

WinHelp Decompiler
GNU General Public License v3.0
26 stars 4 forks source link

gcc / Makefile? #3

Closed zvezdochiot closed 2 years ago

zvezdochiot commented 2 years ago

Hi @pmachapman .

Maybe replace?: https://github.com/pmachapman/helpdeco/blob/198537c33abab4a2ac905b8017eaded64884902c/gcc/Makefile#L19-L38 to

prefix = /usr/local
distdir = helpdeco-2.1.4
vpath = ../src
files = \
        ../src/compat.c \
        ../src/compat.h \
        ../src/helpdec1.c \
        ../src/helpdeco.c \
        ../src/helpdeco.h \
        ../src/splitmrb.c \
        ../src/zapres.c \
        Makefile \
        ../helpfile.txt \
        ../NEWS \
        ../README \
        ../README.de \
        ../ChangeLog

CC=gcc
CFLAGS+=-Wall
LDFLAGS+=-s

all: build

build: helpdeco splitmrb zapres

helpdeco: ../src/helpdeco.o ../src/helpdec1.o ../src/compat.o
        $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)

splitmrb: ../src/splitmrb.o ../src/compat.o
        $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)

zapres: ../src/zapres.o ../src/compat.o
        $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)

clean:
        rm -f ../src/*.o helpdeco zapres splitmrb
pmachapman commented 2 years ago

Hi, Please make a pull request with your change, and I will evaluate the change then after I have tested it.

Thanks,

Peter

zvezdochiot commented 2 years ago

Hi @pmachapman .

Good. Test. (no request, see attach) Makefile.gz

cd gcc
make
zvezdochiot commented 2 years ago

Hi @pmachapman .

Update for make dist. Test. (no request, see attach) Makefile.gz

diff -Nau Makefile.bak Makefile
--- Makefile.bak        2022-06-25 16:42:52.728969622 +0300
+++ Makefile    2022-06-25 16:38:51.376970189 +0300
@@ -32,7 +32,8 @@
         ../NEWS \
         ../README \
         ../README.de \
-        ../ChangeLog
+        ../LICENSE \
+        ../TODO

 CC=gcc
 CFLAGS+=-Wall
@@ -61,13 +62,13 @@

 dist:
        -rm -rf $(distdir)
-       mkdir $(distdir)
+       mkdir -p $(distdir)/src
        for file in $(files); do \
          if test -d $$file; then \
-           cp -p --recursive $$file $(distdir)/$$file; \
+           cp -p --recursive $$file $(distdir)/src/$$file; \
          else \
            test -f $(distdir)/$$file \
-           || cp -p $$file $(distdir)/$$file; \
+           || cp -p $$file $(distdir)/src/$$file; \
          fi; \
        done
        tar --gzip --create --file $(distdir).tar.gz $(distdir)
cd gcc
make dist
pmachapman commented 2 years ago

Can you please create a pull request?

Thanks.

zvezdochiot commented 2 years ago

Hi @pmachapman

See Makefile.gz ;)

pmachapman commented 2 years ago

I have committed it.

Next time, create a Pull Request, please.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request