diff options
| author | Nakidai <nakidai@disroot.org> | 2024-09-22 16:05:27 +0300 |
|---|---|---|
| committer | Nakidai <nakidai@disroot.org> | 2024-09-22 16:05:27 +0300 |
| commit | 13feee2e6c44417f9f5a1a9560eccc463aaef449 (patch) | |
| tree | a4f9734635725d76b0c13f551c9bfb95dca55e64 /Makefile | |
| download | cpetpet-13feee2e6c44417f9f5a1a9560eccc463aaef449.tar.gz cpetpet-13feee2e6c44417f9f5a1a9560eccc463aaef449.zip | |
Add files
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..099cbec --- /dev/null +++ b/Makefile @@ -0,0 +1,37 @@ +include config.mk + +CFLAGS += $(shell MagickWand-config --cflags) +CFLAGS += -std=c99 + +LDFLAGS += $(shell MagickWand-config --ldflags --libs) + +RM = rm -f +SRCDIR = src +OBJDIR = obj +OBJS = cpetpet.o + +all: cpetpet.a cpetpet.so + +$(OBJS): config.h cpetpet.h + +cpetpet.a cpetpet.so: $(OBJS) + +cpetpet.so: + cc -shared -o $@ ${LDFLAGS} ${LDLIBS} $^ + +cpetpet.a: + ar rcs $@ $^ + +install: all + install -d $(DESTDIR)/lib $(DESTDIR)/share/cpetpet + install -m644 cpetpet.a $(DESTDIR)/lib + install -m755 cpetpet.so $(DESTDIR)/lib + install -m644 share/cpetpet/* $(DESTDIR)/share/cpetpet + +clean: + $(RM) *.a *.o *.so + +cleanall: clean + $(RM) config.* config.* + +.PHONY: all clean install |