Makefile

changeset 72
b533da8e7411
parent 69
ff56b28e2cdd
child 74
831928419249
--- a/Makefile	Sun Jun 11 15:21:44 2023 +0200
+++ b/Makefile	Sun Sep 24 18:43:58 2023 +0200
@@ -26,30 +26,27 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
-# available configs: gcc, clang
-CONF=gcc
-
-include $(CONF).mk
+include config.mk
 
 SRC  = frontend.c
 SRC += c2html.c
 SRC += highlighter.c
 
-OBJ = $(SRC:%.c=build/%$(OBJ_EXT))
+OBJ = $(SRC:%.c=build/%.o)
 
 all: build build/c2html
 	
 build/c2html: $(OBJ)
-	$(LD) -o $@ $^ $(LDFLAGS)
+	$(CC) -o $@ $^ $(LDFLAGS)
 	
-build/%$(OBJ_EXT): src/%.c
+build/%.o: src/%.c
 	$(CC) -o $@ $(CFLAGS) -c $<
 
 build:
 	$(MKDIR) $@
 	
-test: all
+check: all
 	cd test && $(MAKE)
 	
 clean:
-	$(RM) $(RMFLAGS) build
+	$(RMDIR) build

mercurial