diff options
| author | LLLL Colonq <llll@colonq> | 2026-04-23 02:08:30 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2026-04-23 02:08:30 -0400 |
| commit | 2850670124e5d5398aca6290558317a24291b219 (patch) | |
| tree | 16523ff7f234813a20ae434080e9f3d3f451fdc7 /Makefile | |
| parent | 2e0091cef23bd8eef5bc0c32b60bbeff7a832de2 (diff) | |
Add WASM build to flake.nix
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 23 |
1 files changed, 18 insertions, 5 deletions
@@ -21,9 +21,9 @@ bindir ?= $(exec_prefix)/bin includedir ?= $(prefix)/include libdir ?= $(exec_prefix)/lib -.PHONY: all clean install check-syntax +.PHONY: all clean install install-bin install-headers install-core install-native check-syntax -all: $(EXE) $(LIB) $(LIB_NATIVE) +all: $(EXE) $(LIB_CORE) $(LIB_NATIVE) $(EXE): $(BUILD)/main.o $(LIB_NATIVE) $(LIB_CORE) $(CC) -o $@ $^ $(LDFLAGS) @@ -42,18 +42,31 @@ $(BUILD)/%.o: src/%.c | $(BUILD) clean: -rm $(EXE) - -rm $(LIB) + -rm $(LIB_CORE) + -rm $(LIB_NATIVE) -rm -r $(BUILD)/ TAGS: $(SRCS) ctags --output-format=etags $^ -install: $(EXE) $(LIB) +install: install-bin install-headers install-core install-native + +install-bin: $(EXE) mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) install $(EXE) $(DESTDIR)$(bindir)/$(EXE) - install $(LIB) $(DESTDIR)$(libdir)/$(LIB) + +install-headers: + mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) cp -r include/* $(DESTDIR)$(includedir) +install-core: $(LIB_CORE) + mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) + install $(LIB_CORE) $(DESTDIR)$(libdir)/$(LIB_CORE) + +install-native: $(LIB_NATIVE) + mkdir -p $(DESTDIR)$(bindir) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) + install $(LIB_NATIVE) $(DESTDIR)$(libdir)/$(LIB_NATIVE) + check-syntax: TAGS gcc $(CFLAGS) -fsyntax-only $(CHK_SOURCES) |
