Skip to content

Commit

Permalink
Replicate makefile edits to Makefile.clang + fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
gs-kamnas committed Feb 9, 2024
1 parent b0913d7 commit efa1fe4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
sudo make install
sudo make uninstall
make distclean
- name: Verify RHEL + SLES package creattion and installation
- name: Verify RHEL + SLES package creation and installation
run: |
docker build -f containers/Dockerfile.rhel -t localhost/cntlm-rpm-packaging:rhel .
docker build -f containers/Dockerfile.sles -t localhost/cntlm-rpm-packaging:sles .
Expand Down
35 changes: 18 additions & 17 deletions Makefile.clang
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ifeq ($(DEBUG),1)
CFLAGS += -g -O0
else
# RELEASE
CFLAGS += -O3
CFLAGS += -g -O3
endif

ifneq ($(findstring CYGWIN,$(OS)),)
Expand Down Expand Up @@ -82,22 +82,29 @@ win/resources.o: win/resources.rc
@echo Win64: adding ICON resource
@windres $^ -o $@

ifneq ($(NOSTRIP),1)
STRIP="-s"
STRIPAIX="-S"
else
STRIP=""
STRIPAIX="-S"
endif
install: $(NAME)
# Special handling for install(1)
if [ "`uname -s`" = "AIX" ]; then \
install -M 755 -S -f $(BINDIR) $(NAME); \
install -M 755 $(STRIPAIX) -f $(BINDIR) $(NAME); \
install -M 644 -f $(MANDIR)/man1 doc/$(NAME).1; \
install -M 600 -c $(SYSCONFDIR) doc/$(NAME).conf; \
elif [ "`uname -s`" = "Darwin" ]; then \
install -d $(BINDIR)/; \
install -m 755 -s $(NAME) $(BINDIR)/$(NAME); \
install -m 755 $(STRIP) $(NAME) $(BINDIR)/$(NAME); \
install -d $(MANDIR)/man1/; \
install -m 644 doc/$(NAME).1 $(MANDIR)/man1/$(NAME).1; \
[ -f $(SYSCONFDIR)/$(NAME).conf -o -z "$(SYSCONFDIR)" ] \
|| install -d $(SYSCONFDIR)/; \
install -m 600 doc/$(NAME).conf $(SYSCONFDIR)/$(NAME).conf; \
else \
install -D -m 755 -s $(NAME) $(BINDIR)/$(NAME); \
install -D -m 755 $(STRIP) $(NAME) $(BINDIR)/$(NAME); \
install -D -m 644 doc/$(NAME).1 $(MANDIR)/man1/$(NAME).1; \
[ -f $(SYSCONFDIR)/$(NAME).conf -o -z "$(SYSCONFDIR)" ] \
|| install -D -m 600 doc/$(NAME).conf $(SYSCONFDIR)/$(NAME).conf; \
Expand Down Expand Up @@ -131,15 +138,11 @@ deb:
fi
mv ../cntlm_$(VER)*.deb .

rpm:
sed -i "s/^\(Version:[\t ]*\)\(.*\)/\1$(VER)/g" rpm/cntlm.spec
if [ `id -u` = 0 ]; then \
rpm/rules binary; \
rpm/rules clean; \
else \
fakeroot rpm/rules binary; \
fakeroot rpm/rules clean; \
fi
rpm: tbz2
sed -i "s/^\(Version:[\t ]*\)\(.*\)/\1$(VER)/g" rpm/SPECS/cntlm.spec
@cp $(NAME)-$(VER).tar.bz2 rpm/SOURCES/
rpmbuild --define '_topdir $(CURDIR)/rpm' -ba rpm/SPECS/cntlm.spec
mv rpm/RPMS/**/*.rpm .

win: win/setup.iss $(NAME) win/cntlm_manual.pdf win/cntlm.ini win/LICENSE.txt $(NAME)-$(VER)-win64.exe $(NAME)-$(VER)-win64.zip

Expand Down Expand Up @@ -193,12 +196,10 @@ clean:

distclean: clean
ifeq ($(findstring CYGWIN,$(OS)),)
if [ `id -u` = 0 ]; then \
if command -v dh_testdir && [ `id -u` = 0 ]; then \
debian/rules clean; \
rpm/rules clean; \
else \
elif command -v dh_testdir; then \
fakeroot debian/rules clean; \
fakeroot rpm/rules clean; \
fi
endif
@rm -f *.exe *.deb *.rpm *.tgz *.tar.gz *.tar.bz2 *.zip *.exe tags ctags pid 2>/dev/null
Expand Down

0 comments on commit efa1fe4

Please sign in to comment.