# Copyright (c) 2025 Jacob Eva (Liberated Embedded Systems) # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # more details. # You should have received a copy of the GNU General Public License along # with this program. If not, see . # This makefile is for GNU / Linux. CC=gcc CFLAGS=-DLOG_USE_COLOR -Wall -O2 -I. -DWIN32 -l crypto LIB=librnode SRCS=$(shell dir /b /s *.c *.h | findstr /v /i "\_linux.c$") OBJS=$(patsubst %.c,%.o,$(SRCS)) F_OBJS=$(notdir $(OBJS)) all: $(OBJS) ar cr build/$(LIB).a -o $(F_OBJS) mv *.o build %.o: %.c $(CC) $(FLAGS) $< -c debug: FLAGS+=-g debug: all test: all $(CC) tests/test.c -L build -l rnode -l tap -l crypto -l md -o build/librnode_test test-debug: debug $(CC) tests/test.c -L build -l rnode -l tap -l crypto -l md -g -o build/librnode_test clean: - rm -rf build - mkdir build