diff options
author | Mattias Andrée <maandree@kth.se> | 2019-10-06 20:36:00 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2019-10-06 20:46:04 +0200 |
commit | 67bc1de939bdfb2072074bc9554dfea9b32f64cd (patch) | |
tree | 1870ce05873f8ed9cdfa87fafa0d8b3e6223dd8d /Makefile | |
parent | fix cielab to ciexyz conversion (diff) | |
download | libclut-67bc1de939bdfb2072074bc9554dfea9b32f64cd.tar.gz libclut-67bc1de939bdfb2072074bc9554dfea9b32f64cd.tar.bz2 libclut-67bc1de939bdfb2072074bc9554dfea9b32f64cd.tar.xz |
Simplify
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | Makefile | 37 | ||||
-rw-r--r-- | Makefile.in | 84 |
2 files changed, 37 insertions, 84 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4ed58b0 --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +.POSIX: + +CONFIGFILE = config.mk +include $(CONFIGFILE) + +all: libclut.a + +libclut.o: libclut.c libclut.h + $(CC) -c -o $@ libclut.c $(CPPFLAGS) $(CFLAGS) + +libclut.a: libclut.o + $(AR) rc $@ libclut.o + $(AR) s $@ + +test.o: test.c libclut.h + $(CC) -c -o $@ test.c $(CPPFLAGS) $(CFLAGS) + +test: test.o libclut.a + $(CC) -o $@ test.o libclut.a $(LDFLAGS) + +check: test + ./test + +install: libclut.a + mkdir -p -- "$(DESTDIR)$(PREFIX)/lib" + mkdir -p -- "$(DESTDIR)$(PREFIX)/include" + cp -- libclut.a "$(DESTDIR)$(PREFIX)/lib" + cp -- libclut.h "$(DESTDIR)$(PREFIX)/include" + +uninstall: + -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libclut.a" + -rm -f -- "$(DESTDIR)$(PREFIX)/include/libclut.h" + +clean: + -rm -f -- *.o *.a test + +.PHONY: all check install uninstall clean diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 13c1fac..0000000 --- a/Makefile.in +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright (C) 2016 Mattias Andrée <maandree@member.fsf.org> -# -# Copying and distribution of this file, with or without modification, -# are permitted in any medium without royalty provided the copyright -# notice and this notice are preserved. This file is offered as-is, -# without any warranty. - - -### This file will be stored to Makefile once you have run ./configure. ### -### See INSTALL for information on how to install this package. ### - - - -##### What is below this line is configurable, but is seldom useful. ##### - - -# Additional options for compiling info and HTML manuals. -INFO_FLAGS = - -# Additional options for compiling DVI, PDF, and PostScript manuals. -TEXINFO_FLAGS = - -# The name of the package as it should be installed. -PKGNAME = libclut - - - -##### Nothing interesting below this. ##### - - -# In case you want add some configurations. Primarily -# intended for maintainers. Perhaps add GPG_KEY here. -# Of course, you can declare everthing with ./configure, -# but with this you are less likely to forget it. --include .make-configurations - - -# YOU, AS A USER, SHOULD NOT CHANGE THESE VARIABLES. {{ -# They specify how the reusable makefiles in mk/ shall behave. - -# Package information. -_PROJECT = libclut -_VERSION = 1.2 - -# Used by mk/lang-c.mk -_C_STD = c99 -_H = libclut -_HEADER_DIRLEVELS = 1 -_LIB = libclut -_OBJ_libclut = libclut -_SO_VERSION_libclut = $(_VERSION) -_SO_MAJOR_libclut = $(shell echo $(_SO_VERSION_libclut) | cut -d . -f 1) - -# Used by mk/texinfo.mk -_TEXINFO_DIRLEVELS = 2 -_INFOPARTS = 0 -_HAVE_TEXINFO_MANUAL = yes -_HTML_FILES = Free-Software-Needs-Free-Documentation.html GNU-Free-Documentation-License.html \ - GNU-General-Public-License.html index.html Overview.html CLUT-Manipulation.html \ - Colour-Spaces.html - -# Used by mk/man.mk -#_MAN_PAGE_SECTIONS = 0 3 7 -#_MAN_0 = libclut.h -#_MAN_3 = -#_MAN_7 = libclut - -# Used by mk/copy.mk -_COPYING = COPYING - -# Used by mk/dist.mk -___EVERYTHING_INFO = libclut titlepage-data content hardcopy-copying \ - appx/fdl appx/free-software-needs-free-documentation appx/gpl \ - reusable/macros reusable/paper reusable/titlepage \ - chap/overview chap/clut-manipulation.texinfo chap/colour-spaces.texinfo -_EVERYTHING = $(__EVERYTHING_ALL_COMMON) DEPENDENCIES INSTALL NEWS \ - $(foreach F,$(___EVERYTHING_INFO),doc/info/$(F).texinfo) libclut.h - -# }} - - -# Reusable make rules and the configurations. -include $(v)mk/all.mk - |