Skip to content

Commit

Permalink
Got clang to behave with header files
Browse files Browse the repository at this point in the history
  • Loading branch information
cheng-alvin committed Nov 2, 2023
1 parent ae4b3d0 commit 187a13e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ CC = clang
LD = clang
DB = gdb

CFLAGS = -I ../include

OBJ = main.o parse.o
BUILD = ../build

Expand All @@ -10,10 +12,9 @@ all: clean jas
jas: $(OBJ)
$(LD) $^ -o $(BUILD)/$@

CFLAGS = -g

debug: $(OBJ)
$(LD) $^ -o $(BUILD)/$@ $(CFLAGS)
$(LD) $^ -o $(BUILD)/$@ $(CFLAGS) -g
sudo $(DB) $(BUILD)/$@

clean:
Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <parse.h>
#include "parse.h"
#include <stdio.h>
#include <stdlib.h>

Expand Down
2 changes: 1 addition & 1 deletion src/parse.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <parse.h>
#include "parse.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down

0 comments on commit 187a13e

Please sign in to comment.