diff options
author | kraxel <kraxel> | 2005-02-09 11:49:57 +0000 |
---|---|---|
committer | kraxel <kraxel> | 2005-02-09 11:49:57 +0000 |
commit | 65b4d6491a2fcd32efe5b0cacf137305af95b541 (patch) | |
tree | 02902d70eca9938000f4b4f97793fa6c4423be24 /GNUmakefile | |
parent | 73671a2f4f0e6e03a509ff5a97ab70d7b0db12b1 (diff) | |
download | scsi-changer-65b4d6491a2fcd32efe5b0cacf137305af95b541.tar.gz |
- add/update files.
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..b2c62c1 --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,91 @@ +# config +srcdir = . +VPATH = $(srcdir) +-include Make.config +include $(srcdir)/mk/Variables.mk + +resdir = $(DESTDIR)$(RESDIR) + +# fixup flags +CFLAGS += -DVERSION='"$(VERSION)"' -I$(srcdir) + +# default target +all: build + +# what to build +TARGETS := mover autojuke unload +ifeq ($(HAVE_MOTIF),yes) + TARGETS += xmover +endif + + +################################################################# +# poor man's autoconf ;-) + +include $(srcdir)/mk/Autoconf.mk + +define make-config +LIB := $(LIB) +RESDIR := $(call ac_resdir) +HAVE_MOTIF := $(call ac_lib,XmStringGenerate,Xm,-L/usr/X11R6/$(LIB) -lXpm -lXt -lXext -lX11) +endef + +# for X11 + Motif +xmover : CFLAGS += -I/usr/X11R6/include +xmover : LDFLAGS += -L/usr/X11R6/$(LIB) +xmover : LDLIBS += -lXm -lXpm -lXt -lXext -lX11 + +# RegEdit.c is good old K&R ... +RegEdit.o : CFLAGS += -Wno-missing-prototypes -Wno-strict-prototypes + + +######################################################################## +# targets + +unload: unload.o + +mover: mover.o + +xmover: xmover.o man.o RegEdit.o + +xmover.o: xmover.c xmover.h + +xmover.h: xmover.ad $(srcdir)/fallback.pl + perl $(srcdir)/fallback.pl < $< > $@ + +load: unload + ln -s unload load + + +######################################################################## +# general rules + +.PHONY: build install clean distclean realclean +build: $(TARGETS) + +install: build + $(INSTALL_DIR) $(bindir) + $(INSTALL_DIR) $(mandir)/man1 + $(INSTALL_DIR) $(mandir)/man8 + $(INSTALL_BINARY) $(TARGETS) $(bindir) + $(INSTALL_DATA) $(srcdir)/mover.man $(mandir)/man1/mover.1 + $(INSTALL_DATA) $(srcdir)/xmover.man $(mandir)/man1/xmover.1 + $(INSTALL_DATA) $(srcdir)/autojuke.man $(mandir)/man8/autojuke.8 + $(INSTALL_DATA) -m644 autojuke.conf $(etc) + +clean: + -rm -f *.o $(depfiles) core core.* + +realclean distclean: clean + -rm -f Make.config + -rm -f $(TARGETS) *~ rd/*~ wr/*~ xpm/*~ Ida.ad.h logo.h + +include $(srcdir)/mk/Compile.mk +-include $(depfiles) + + +######################################################################## +# maintainer stuff + +include $(srcdir)/mk/Maintainer.mk + |