mirror of
https://github.com/gophernicus/gophernicus.git
synced 2024-06-23 06:35:34 +00:00
clean up Makefile
This commit is contained in:
parent
01ab34b2b6
commit
5c6f9c37e2
40
Makefile
40
Makefile
|
@ -10,9 +10,6 @@ PACKAGE = $(NAME)
|
||||||
BINARY = $(NAME)
|
BINARY = $(NAME)
|
||||||
VERSION = 3.0.1
|
VERSION = 3.0.1
|
||||||
CODENAME = Dungeon Edition
|
CODENAME = Dungeon Edition
|
||||||
AUTHOR = h9bnks and fosslinux
|
|
||||||
EMAIL = gophernicus@gophernicus.org
|
|
||||||
STARTED = 2009
|
|
||||||
|
|
||||||
SOURCES = $(NAME).c file.c menu.c string.c platform.c session.c options.c
|
SOURCES = $(NAME).c file.c menu.c string.c platform.c session.c options.c
|
||||||
HEADERS = functions.h files.h
|
HEADERS = functions.h files.h
|
||||||
|
@ -54,19 +51,16 @@ IPCRM = /usr/bin/ipcrm
|
||||||
#
|
#
|
||||||
# Platform support, compatible with both BSD and GNU make
|
# Platform support, compatible with both BSD and GNU make
|
||||||
#
|
#
|
||||||
all: headers
|
all:
|
||||||
@case `uname` in \
|
@case `uname` in \
|
||||||
Darwin) $(MAKE) ROOT="$(OSXROOT)" DESTDIR="$(OSXDEST)" $(BINARY); ;; \
|
Darwin) $(MAKE) ROOT="$(OSXROOT)" DESTDIR="$(OSXDEST)" $(BINARY); ;; \
|
||||||
Haiku) $(MAKE) EXTRA_LIBS="-lnetwork" $(BINARY); ;; \
|
Haiku) $(MAKE) EXTRA_LIBS="-lnetwork" $(BINARY); ;; \
|
||||||
*) if [ -f "/usr/include/tcpd.h" ]; then $(MAKE) withwrap; else $(MAKE) $(BINARY); fi; ;; \
|
*) if [ -f "/usr/include/tcpd.h" ]; then $(MAKE) withwrap; else $(MAKE) $(BINARY); fi; ;; \
|
||||||
esac
|
esac
|
||||||
|
|
||||||
generic: $(BINARY)
|
|
||||||
|
|
||||||
withwrap:
|
withwrap:
|
||||||
$(MAKE) EXTRA_CFLAGS="-DHAVE_LIBWRAP" EXTRA_LIBS="-lwrap" $(BINARY)
|
$(MAKE) EXTRA_CFLAGS="-DHAVE_LIBWRAP" EXTRA_LIBS="-lwrap" $(BINARY)
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Special targets
|
# Special targets
|
||||||
#
|
#
|
||||||
|
@ -76,6 +70,9 @@ deb:
|
||||||
#
|
#
|
||||||
# Building
|
# Building
|
||||||
#
|
#
|
||||||
|
|
||||||
|
headers: $(HEADERS)
|
||||||
|
|
||||||
$(NAME).c: headers $(NAME).h
|
$(NAME).c: headers $(NAME).h
|
||||||
|
|
||||||
$(BINARY): $(OBJECTS)
|
$(BINARY): $(OBJECTS)
|
||||||
|
@ -85,9 +82,6 @@ $(BINARY): $(OBJECTS)
|
||||||
$(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) -DVERSION="\"$(VERSION)\"" -DCODENAME="\"$(CODENAME)\"" -DDEFAULT_ROOT="\"$(ROOT)\"" $< -o $@
|
$(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) -DVERSION="\"$(VERSION)\"" -DCODENAME="\"$(CODENAME)\"" -DDEFAULT_ROOT="\"$(ROOT)\"" $< -o $@
|
||||||
|
|
||||||
|
|
||||||
headers: $(HEADERS)
|
|
||||||
@echo
|
|
||||||
|
|
||||||
functions.h:
|
functions.h:
|
||||||
echo "/* Automatically generated function definitions */" > $@
|
echo "/* Automatically generated function definitions */" > $@
|
||||||
echo >> $@
|
echo >> $@
|
||||||
|
@ -114,7 +108,7 @@ files.h: bin2c README
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Cleanup after building
|
# Clean targets
|
||||||
#
|
#
|
||||||
clean: clean-build clean-deb
|
clean: clean-build clean-deb
|
||||||
|
|
||||||
|
@ -303,27 +297,3 @@ uninstall-systemd:
|
||||||
done; \
|
done; \
|
||||||
fi
|
fi
|
||||||
@echo
|
@echo
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# List all C defines
|
|
||||||
#
|
|
||||||
defines: functions.h files.h
|
|
||||||
$(CC) -dM -E $(NAME).c
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# LOC
|
|
||||||
#
|
|
||||||
loc:
|
|
||||||
@wc -l *.c
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Fix copyright notes
|
|
||||||
#
|
|
||||||
copyright: README
|
|
||||||
sed -i .stupid -e "s/Copyright .c. 2.*$$/Copyright (c) $(STARTED)-`date +%Y` $(AUTHOR) <$(EMAIL)>/" *.c *.h LICENSE $(README) debian/copyright
|
|
||||||
sed -i .stupid -e "s/Maintainer: .*$$/Maintainer: $(AUTHOR) <$(EMAIL)>/" debian/control
|
|
||||||
rm -f *.stupid debian/*.stupid
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user