Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This one is untested, but it roughly matches the structure I use in my NES makefiles
- objlist := chat draw config gui cJSON text squirrel eventcmd fnmatch
- program_title = chat
- CC := gcc
- LD := gcc
- CFLAGS := -Wall -Wextra -std=gnu99
- LDFLAGS := -Wl,-subsystem,windows
- LDLIBS := -lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_net -lSDL2_ttf -lsquirrel -lsqstdlib
- objdir := obj/win32
- srcdir := src
- objlisto := $(foreach o,$(objlist),$(objdir)/$(o).o)
- .PHONY: clean
- program_title: $(objlisto) src/spark.res
- $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
- $(objdir)/%.o: $(srcdir)/%.c
- $(CC) $(CFLAGS) $< -o $@
- clean:
- -rm $(objdir)/*.o
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement