diff options
| author | Alexander M Pickering <alex@cogarr.net> | 2023-04-30 00:25:28 -0500 |
|---|---|---|
| committer | Alexander M Pickering <alex@cogarr.net> | 2023-04-30 00:25:28 -0500 |
| commit | fddb43101fad2b926efc80409c9d41a9948665ec (patch) | |
| tree | b6fa4c5b1874c1af1730f541236c38867924854c /Makefile | |
| parent | f7f86b7542f701351ba23a4f19cc2c946fb45caf (diff) | |
| download | lua-nng-fddb43101fad2b926efc80409c9d41a9948665ec.tar.gz lua-nng-fddb43101fad2b926efc80409c9d41a9948665ec.tar.bz2 lua-nng-fddb43101fad2b926efc80409c9d41a9948665ec.zip | |
Update build rules
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -23,18 +23,23 @@ endif src_files=$(wildcard src/*.c) obj_files=$(src_files:src/%.c=build/%.o) target=bin/nng.$(LIB_EXTENSION) +installed_target=$(target:bin/%=$(INST_LIBDIR)/%) + +.PHONY: all install test clean all: $(target) $(target) : $(obj_files) - echo "Lua_lib is: $(LUA_LIB), libs are: $(LIBS)" $(LD) $(LADFLAGS) -o $@ $^ $(LIBS) +$(installed_target) : $(target) + $(MKDIR) -p $(@D) + $(CP) $< $@ + $(obj_files): build/%.o : src/%.c $(CC) $(CAFLAGS) -c -o $@ $< -install: $(target) - $(CP) $(target) $(INST_LIBDIR) +install: $(installed_target) test: busted --cpath=./bin/?$(SHARE_EXT) |
