diff options
author | B. Stack <bgstack15@gmail.com> | 2022-10-09 17:57:05 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-10-09 17:57:05 -0400 |
commit | a7738f4dc72c9445623cd6f5348d7a80d4e52690 (patch) | |
tree | b336daf9b226783c39e6e985410cecf46484de3d /Makefile | |
download | fbxkb-a7738f4dc72c9445623cd6f5348d7a80d4e52690.tar.gz fbxkb-a7738f4dc72c9445623cd6f5348d7a80d4e52690.tar.bz2 fbxkb-a7738f4dc72c9445623cd6f5348d7a80d4e52690.zip |
initial commit, straight from apt-get source
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9de5446 --- /dev/null +++ b/Makefile @@ -0,0 +1,71 @@ +# Part 0 +# load common stuff +TOPDIR = . +include $(TOPDIR)/Makefile.common + +# Part 1 +# recursive make +.PHONY: subdirs +all clean distclean install uninstall: subdirs + +SUBDIRS = man images +.PHONY: $(SUBDIRS) +subdirs: $(SUBDIRS) +$(SUBDIRS): + $(MAKE) -C $@ $(MAKECMDGOALS) + + + +SRC = fbxkb.c eggtrayicon.c +OBJ = $(SRC:%.c=%.o) +DEP = $(SRC:%.c=%.dep) + +ifneq ($(MAKECMDGOALS),clean) +ifneq ($(MAKECMDGOALS),distclean) +ifneq ($(MAKECMDGOALS),tar) +-include $(DEP) +endif +endif +endif + +TARGET = fbxkb +$(TARGET): $(OBJ) + $(CC) $(LDFLAGS) $(OBJ) -Wl,--as-needed $(LIBS) -o $@ + +all: $(TARGET) + + +clean: + $(RM) $(TARGET) $(OBJ) $(DEP) *~ + +distclean: + rm -f Makefile.config config.h + +install: + install -d $(PREFIX)/bin + install -m 755 $(TARGET) $(PREFIX)/bin + +uninstall: + rm -f $(PREFIX)/bin/$(TARGET) + +.PHONY: tar + + +CWD=$(shell pwd) +VER=$(shell grep -e "\#define[[:space:]]\+VERSION[[:space:]]\+" version.h | \ + sed -e 's/^[^\"]\+\"//' -e 's/\".*$$//' ) + + +tar: + $(MAKE) distclean + cd ..; \ + if [ -e fbxkb-$(VER) ]; then \ + echo fbxkb-$(VER) already exist; \ + echo "won't override";\ + exit 1;\ + else\ + ln -s $(CWD) fbxkb-$(VER);\ + tar --exclude=.svn -hzcvf fbxkb-$(VER).tgz fbxkb-$(VER);\ + rm -f fbxkb-$(VER);\ + fi; + |