Place build outputs in obj/ and bin/ directories
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3b4d97b0dc
commit
0e8bb9f989
3 changed files with 14 additions and 6 deletions
2
forms/.gitignore
vendored
Normal file
2
forms/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
obj/
|
||||||
|
bin/
|
||||||
|
|
@ -36,8 +36,8 @@ Windows 3.1 controls and sends user events back to the server.
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
```
|
```
|
||||||
make # builds dfm2form and formsrv.o
|
make # builds bin/dfm2form and obj/formsrv.o
|
||||||
make clean # removes build artifacts
|
make clean # removes obj/ and bin/
|
||||||
```
|
```
|
||||||
|
|
||||||
Requires GCC on Linux. The Delphi unit (`formcli.pas`) is compiled as
|
Requires GCC on Linux. The Delphi unit (`formcli.pas`) is compiled as
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,21 @@ CC = gcc
|
||||||
CFLAGS = -Wall -Wextra -std=c99 -O2
|
CFLAGS = -Wall -Wextra -std=c99 -O2
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
|
|
||||||
all: dfm2form formsrv.o
|
OBJDIR = obj
|
||||||
|
BINDIR = bin
|
||||||
|
|
||||||
dfm2form: dfm2form.c
|
all: $(BINDIR)/dfm2form $(OBJDIR)/formsrv.o
|
||||||
|
|
||||||
|
$(BINDIR)/dfm2form: dfm2form.c | $(BINDIR)
|
||||||
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
|
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
|
||||||
|
|
||||||
formsrv.o: formsrv.c formsrv.h
|
$(OBJDIR)/formsrv.o: formsrv.c formsrv.h | $(OBJDIR)
|
||||||
$(CC) $(CFLAGS) -c -o $@ formsrv.c
|
$(CC) $(CFLAGS) -c -o $@ formsrv.c
|
||||||
|
|
||||||
|
$(OBJDIR) $(BINDIR):
|
||||||
|
mkdir -p $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f dfm2form formsrv.o
|
rm -rf $(OBJDIR) $(BINDIR)
|
||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue