diff options
author | Егор Львов <workregor@mail.ru> | 2023-03-27 11:25:27 +0300 |
---|---|---|
committer | Егор Львов <workregor@mail.ru> | 2023-03-27 11:25:27 +0300 |
commit | 3c0a3b8413ee58a3e5678075c862e95f7c8395c6 (patch) | |
tree | 8ca9eba9378f921636788fee7664c2bd63bc40ff /simulations/Makefile |
Начальный коммит
Diffstat (limited to 'simulations/Makefile')
-rw-r--r-- | simulations/Makefile | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/simulations/Makefile b/simulations/Makefile new file mode 100644 index 0000000..9435c91 --- /dev/null +++ b/simulations/Makefile @@ -0,0 +1,41 @@ +# A simple Makefile for compiling small SDL projects + +# set the compiler +CC := gcc + +# set the compiler flags +CFLAGS := `sdl2-config --libs --cflags` -ggdb3 -O3 --std=c11 -Wall -lSDL2_image -lm +# add header files here +HDRS := + +# add source files here +SRCS := universe.c + +# generate names of object files +OBJS := $(SRCS:.c=.o) + +# name of executable +EXEC := outp + +# default recipe +all: $(EXEC) + +showfont: showfont.c Makefile + $(CC) -o $@ $@.c $(CFLAGS) $(LIBS) + +glfont: glfont.c Makefile + $(CC) -o $@ $@.c $(CFLAGS) $(LIBS) + +# recipe for building the final executable +$(EXEC): $(OBJS) $(HDRS) Makefile + $(CC) -o $@ $(OBJS) $(CFLAGS) + +# recipe for building object files +#$(OBJS): $(@:.o=.c) $(HDRS) Makefile +# $(CC) -o $@ $(@:.o=.c) -c $(CFLAGS) + +# recipe to clean the workspace +clean: + rm -f $(EXEC) $(OBJS) + +.PHONY: all clean |