mirror of
https://github.com/gophernicus/gophernicus.git
synced 2025-01-03 14:56:43 -05: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)
|
||||
VERSION = 3.0.1
|
||||
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
|
||||
HEADERS = functions.h files.h
|
||||
@ -54,19 +51,16 @@ IPCRM = /usr/bin/ipcrm
|
||||
#
|
||||
# Platform support, compatible with both BSD and GNU make
|
||||
#
|
||||
all: headers
|
||||
all:
|
||||
@case `uname` in \
|
||||
Darwin) $(MAKE) ROOT="$(OSXROOT)" DESTDIR="$(OSXDEST)" $(BINARY); ;; \
|
||||
Haiku) $(MAKE) EXTRA_LIBS="-lnetwork" $(BINARY); ;; \
|
||||
*) if [ -f "/usr/include/tcpd.h" ]; then $(MAKE) withwrap; else $(MAKE) $(BINARY); fi; ;; \
|
||||
esac
|
||||
|
||||
generic: $(BINARY)
|
||||
|
||||
withwrap:
|
||||
$(MAKE) EXTRA_CFLAGS="-DHAVE_LIBWRAP" EXTRA_LIBS="-lwrap" $(BINARY)
|
||||
|
||||
|
||||
#
|
||||
# Special targets
|
||||
#
|
||||
@ -76,6 +70,9 @@ deb:
|
||||
#
|
||||
# Building
|
||||
#
|
||||
|
||||
headers: $(HEADERS)
|
||||
|
||||
$(NAME).c: headers $(NAME).h
|
||||
|
||||
$(BINARY): $(OBJECTS)
|
||||
@ -85,9 +82,6 @@ $(BINARY): $(OBJECTS)
|
||||
$(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) -DVERSION="\"$(VERSION)\"" -DCODENAME="\"$(CODENAME)\"" -DDEFAULT_ROOT="\"$(ROOT)\"" $< -o $@
|
||||
|
||||
|
||||
headers: $(HEADERS)
|
||||
@echo
|
||||
|
||||
functions.h:
|
||||
echo "/* Automatically generated function definitions */" > $@
|
||||
echo >> $@
|
||||
@ -114,7 +108,7 @@ files.h: bin2c README
|
||||
|
||||
|
||||
#
|
||||
# Cleanup after building
|
||||
# Clean targets
|
||||
#
|
||||
clean: clean-build clean-deb
|
||||
|
||||
@ -303,27 +297,3 @@ uninstall-systemd:
|
||||
done; \
|
||||
fi
|
||||
@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