forked from nakidai/csnake
1
0
Fork 0

Fix Makefile

Nakidai 2023-12-02 12:29:29 +03:00
parent f70e3d949a
commit bfaf0f0e02
1 changed files with 6 additions and 6 deletions

View File

@ -11,19 +11,19 @@ DEFLDFLAGS = $(shell if echo "" | cc -E -dM -xc - | grep __FreeBSD__ > /dev/null
all: $(OUT) all: $(OUT)
obj: $(OBJDIR):
mkdir obj mkdir $(OBJDIR)
platform: obj $(OBJDIR)/platform: $(OBJDIR)
mkdir obj/platform mkdir $(OBJDIR)/platform
$(OBJDIR)/%.o: $(SRCDIR)/%.c $(OBJDIR)/%.o: $(SRCDIR)/%.c
$(CC) -c -o $@ $< $(CFLAGS) $(INCLUDE) $(CC) -c -o $@ $< $(CFLAGS) $(INCLUDE)
$(OUT): obj platform $(OBJ) $(OUT): $(OBJDIR) $(OBJDIR)/platform $(OBJ)
$(CC) -o $@ $(OBJ) $(LDFLAGS) $(DEFLDFLAGS) $(CC) -o $@ $(OBJ) $(LDFLAGS) $(DEFLDFLAGS)
clean: clean:
$(RM) -r $(OUT) $(OBJDIR)/* $(RM) $(OUT) $(OBJDIR)/*.o $(OBJDIR)/platform/*.o
.PHONY: default clean .PHONY: default clean